summaryrefslogtreecommitdiff
path: root/src/d_iwad.h
diff options
context:
space:
mode:
authorSimon Howard2014-04-10 00:29:11 -0400
committerSimon Howard2014-04-10 00:29:11 -0400
commit12a2c9441eff63f8cd3db594b826305454736182 (patch)
treea2a5bfd4c7e83d9fd7fefde0336dee1da8502f96 /src/d_iwad.h
parent174fe185ec8b05a1dc6ce8c49ffc5a0aa1c81855 (diff)
downloadchocolate-doom-12a2c9441eff63f8cd3db594b826305454736182.tar.gz
chocolate-doom-12a2c9441eff63f8cd3db594b826305454736182.tar.bz2
chocolate-doom-12a2c9441eff63f8cd3db594b826305454736182.zip
midifile: Fix portability issue with malloc(0).
In the C standards, malloc(0) may return NULL without indicating a failure to allocate. As values read from the MIDI file may be arbitrary, add one to the allocated length so that we always allocated a positive value. This fixes #165 (thanks nmain).
Diffstat (limited to 'src/d_iwad.h')
0 files changed, 0 insertions, 0 deletions