# HG changeset patch # User Ben Schmidt # Date 1286367986 -39600 # Node ID b58fd7980358325550778ea2b7e56b8f869d442c # Parent c02582939bbc0cadbcb742f001b4cf06ed9f889d Fix theoretically possible memory corruption by chomp() A quick survey of callers of chomp() suggests this never could occur in practice diff -r c02582939bbc -r b58fd7980358 ChangeLog --- a/ChangeLog Wed Oct 06 10:12:23 2010 +1100 +++ b/ChangeLog Wed Oct 06 23:26:26 2010 +1100 @@ -1,3 +1,4 @@ + o Fix theoretically possible memory corruption by chomp() o Remove .sh from mlmmj-make-ml.sh; symlink original name o Correct spelling of 'receive' and 'voodoo' throughout the code and documentation, making mlmmj-recieve a symlink to mlmmj-receive (Chris Webb) diff -r c02582939bbc -r b58fd7980358 src/chomp.c --- a/src/chomp.c Wed Oct 06 10:12:23 2010 +1100 +++ b/src/chomp.c Wed Oct 06 23:26:26 2010 +1100 @@ -31,7 +31,7 @@ if(str == NULL) return NULL; - if(*str == '\0' || *str == '\n') { + if(*str == '\0' || *str == '\n' || *str == '\r') { *str = '\0'; return str; }