Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/games/worms



Module Name:    src
Committed By:   kre
Date:           Sat Apr 15 13:00:30 UTC 2023

Modified Files:
        src/games/worms: worms.c

Log Message:
Garbage collect "char *mp" - it used to point at memory malloc()'d
to hold the termcap entry, back when worms used termcap rather than
curses, and termcap was termcap, rather that a terminfo wannabe.

This should have been removed when worms was converted to curses in
1999, but wasn't, so worms has been doing a meaningless malloc(1024)
and never using the result, ever since.

While here, since the line needed changing anyway to remove mp,
change a malloc() of a product into calloc() so it can deal with
any possible (admittedly extremely unlikely here) integer overflows.

NFCI


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/games/worms/worms.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index