summaryrefslogtreecommitdiff
path: root/src/CrDatFrI.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2016-12-06 22:34:33 +0100
committerMatthieu Herrb <matthieu@herrb.eu>2016-12-12 22:49:43 +0100
commit1ec33006a9e4214b390045b820464e24297dc6c0 (patch)
treeab9a6f0b8c877b0dba42a1d13d6a9249669d8e53 /src/CrDatFrI.c
parentc46dedeba15edf7216d62633ed6daf40cd1f5bfd (diff)
Gracefully handle EOF while parsing files.
libXpm does not properly handle EOF conditions when xpmGetC is called multiple times in a row to construct a string. Instead of checking its return value for EOF, the result is automatically casted into a char and attached to a string. By carefully crafting the color table in an XPM file, it is possible to send a libXpm program like gimp into a very long lasting loop and massive memory allocations. Otherwise no memory issues arise, therefore this is just a purely functional patch to dismiss invalid input. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <Matthieu@herrb.eu>
Diffstat (limited to 'src/CrDatFrI.c')
0 files changed, 0 insertions, 0 deletions