diff options
author | Simon Howard | 2014-04-10 00:29:11 -0400 |
---|---|---|
committer | Simon Howard | 2014-04-10 00:29:11 -0400 |
commit | 12a2c9441eff63f8cd3db594b826305454736182 (patch) | |
tree | a2a5bfd4c7e83d9fd7fefde0336dee1da8502f96 /textscreen/txt_sdl.c | |
parent | 174fe185ec8b05a1dc6ce8c49ffc5a0aa1c81855 (diff) | |
download | chocolate-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 'textscreen/txt_sdl.c')
0 files changed, 0 insertions, 0 deletions