path: root/dist
diff options
authorRich Felker <>2015-12-19 23:43:31 -0500
committerRich Felker <>2015-12-19 23:43:31 -0500
commitd87f0a9a95f0a1228ee5579e5822a8c93bc96823 (patch)
tree04e8b2769da6dfde2239e38ff7481001e0c34960 /dist
parent42216742cd69e52e70aeb1d14498a8145872de52 (diff)
avoid updating caller's size when getdelim fails to realloc
getdelim was updating *n, the caller's stored buffer size, before calling realloc. if getdelim then failed due to realloc failure, the caller would see in *n a value larger than the actual size of the allocated block, and use of that value is unsafe. in particular, passing it again to getdelim is unsafe. now, temporary storage is used for the desired new size, and *n is not written until realloc succeeds.
Diffstat (limited to 'dist')
0 files changed, 0 insertions, 0 deletions