Mercurial > libpst
annotate archive/libpst.c.diff @ 357:544d57fe6bc6
From Jeffrey Morlan:
try_fork in readpst.c doesn't check that active_children <
max_children before forking a child and adding it to the array. This can
cause a buffer overflow.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 06 Jul 2016 10:17:49 -0700 |
parents | de3753c3160a |
children |
rev | line source |
---|---|
57
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
1 Index: libpst.c |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
2 =================================================================== |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
3 --- libpst.c (revision 45) |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
4 +++ libpst.c (working copy) |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
5 @@ -296,7 +296,9 @@ |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
6 size = _pst_ff_getID2data(pf, ptr, &h); |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
7 // will need to encode any bytes left over |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
8 c = base64_encode(h.base64_extra_chars, h.base64_extra); |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
9 - pst_fwrite(c, 1, strlen(c), fp); |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
10 + if(c != NULL) { |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
11 + pst_fwrite(c, 1, strlen(c), fp); |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
12 + } |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
13 } else { |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
14 DEBUG_WARN (("Couldn't find ID pointer. Cannot save attachement to Base64\n")); |
de3753c3160a
add archive directory with history of alioth versions that have been merged here
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
15 } |