|
ClamAV infinite loop: msg#00008security.virus.clamav.devel
In tracking down another problem when memory runs out, I found an infinite loop. In mbox.c, starting at line 1633. for(multiparts = 0; t_line; multiparts++) { int lines = 0; message **m; m = cli_realloc(messages, ((multiparts + 1) * sizeof(message *))); if(m == NULL) break; messages = m; aMessage = messages[multiparts] = messageCreate(); if(aMessage == NULL) { multiparts--; continue; } cli_realloc() doesn't fail, so it never breaks out of the loop from that. messageCreate(), which calls cli_calloc(), DOES fail, so it decrements the part number and goes back to the for loop, which increments the part number, which does the same thing it just tried, with the same results, ad infinitum. What's supposed to be accomplished by retrying after messageCreate()? Nothing gets freed in the loop, so why try the calloc() again? _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | ClamLite: 00008, Bogusław Brandys |
|---|---|
| Next by Date: | access violation in cli_bm_scanbuff: 00008, Yuri Dario |
| Previous by Thread: | ClamLitei: 00008, Bogusław Brandys |
| Next by Thread: | Re: ClamAV infinite loop: 00008, Nigel Horne |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |