mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix possible pointer past end of data
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16213 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bbfcf1ff52
commit
04e888af0a
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-03-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSMime.m: (_unfoldHeader) Check that input pointer doesn't
|
||||
run past end of data.
|
||||
|
||||
2003-03-05 15:50 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSBundle.m (+initialize) [PROCFS_EXE_LINK]: Make sure that
|
||||
|
|
|
@ -2428,7 +2428,8 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
/*
|
||||
* See if we have a wrapped line.
|
||||
*/
|
||||
if ((c = bytes[input]) == '\r' || c == '\n' || isspace(c) == 0)
|
||||
if (input < dataEnd
|
||||
&& ((c = bytes[input]) == '\r' || c == '\n' || isspace(c) == 0))
|
||||
{
|
||||
unwrappingComplete = YES;
|
||||
bytes[lineEnd] = '\0';
|
||||
|
|
Loading…
Reference in a new issue