• Staale Smedseng's avatar
    Bug #42502 huge memory leak possible with timezone · 4ecbd0b5
    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.
    4ecbd0b5
tztime.cc 85 KB