[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tpop3d-discuss]sigsegv error, patch attached
From: |
Jeff Davis |
Subject: |
[tpop3d-discuss]sigsegv error, patch attached |
Date: |
Fri, 12 Mar 2004 03:55:29 -0800 |
In version 1.5.3 I was getting a memory error when using the maildir
mbox type.
In summary, the function maildir_new would assign to the boolean var
"locked" similar to the following:
if( this_condition && !(locked = maildir_lock(M->name))) {
...
}
And the problem was, locked was not initialized to false. So, if
this_condition failed, the RHS would not be evaluated, and thus locked
would not be assigned, and then generally have a true value.
Later, of course the value of locked is tested, and succeeds, and then
attempts to maildir_unlock(M->name), which causes the segfault, since
maildir_unlock assumes M->name is locked (which it isn't, it's just
fooled by the uninitialized variable).
Regards,
Jeff Davis
tpop3d-1.5.3.patch
Description: Text Data
- [tpop3d-discuss]sigsegv error, patch attached,
Jeff Davis <=