• Staale Smedseng's avatar
    Bug #42502 huge memory leak possible with timezone · 28f4090b
    Staale Smedseng authored
    functions
          
    Unknown timezone specifications are properly rejected
    by the server, but are copied into tz_storage before
    rejection, and hence is retained until end of server 
    life. With sufficiently large bogus timezone specs, 
    it is easy to exhaust system memory.
          
    Allocation of memory for a copy of the timezone
    name is delayed until after verification of validity,
    at the cost of a memcpy of the timezone info. This 
    only happens once, future lookups will hit the cached
    structure.
    28f4090b
tztime.cc 85 KB