Skip to content

Commit

Permalink
Memory error in DollarFactorize repaired.
Browse files Browse the repository at this point in the history
  • Loading branch information
vermaseren committed Sep 1, 2015
1 parent f10df57 commit 5fbce8e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sources/dollar.c
Original file line number Diff line number Diff line change
Expand Up @@ -2917,17 +2917,16 @@ int DollarFactorize(PHEAD WORD numdollar)
return(1);
}
else if ( ( buf1content[0] == 4 ) && ( buf1content[1] == 1 ) &&
( buf1content[2] == 1 ) && ( buf1content[3] == 3 ) &&
( buf1content[4] == 0 ) ) { /* Nothing happened */
M_free(buf2,"DollarFactorize-2");
( buf1content[2] == 1 ) && ( buf1content[3] == 3 ) ) { /* Nothing happened */
if ( buf2 != buf1 ) M_free(buf2,"DollarFactorize-2");
buf2 = buf1;
factorsincontent = 0;
}
else {
/*
The way we took out objects is rather brutish. We have to normalize
*/
M_free(buf1,"DollarFactorize-1");
if ( buf2 != buf1 ) M_free(buf1,"DollarFactorize-1");
buf1 = buf2;
t = buf1; while ( *t ) t += *t;
insize = t - buf1;
Expand Down

0 comments on commit 5fbce8e

Please sign in to comment.