Author: pschweitzer
Date: Thu Feb 16 16:50:16 2012
New Revision: 55639
URL:
http://svn.reactos.org/svn/reactos?rev=55639&view=rev
Log:
[CABMAN]
Ensure line reading buffer is big enough to hold complete paths.
Remove a magic value usage accordingly.
Modified:
trunk/reactos/tools/cabman/dfp.cxx
trunk/reactos/tools/cabman/dfp.h
Modified: trunk/reactos/tools/cabman/dfp.cxx
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/dfp.cxx?rev=5…
==============================================================================
--- trunk/reactos/tools/cabman/dfp.cxx [iso-8859-1] (original)
+++ trunk/reactos/tools/cabman/dfp.cxx [iso-8859-1] Thu Feb 16 16:50:16 2012
@@ -1281,7 +1281,7 @@
return false;
i = 0;
- while (((j = CurrentOffset + i) < FileBufferSize) && (i < 127)
&&
+ while (((j = CurrentOffset + i) < FileBufferSize) && (i < sizeof(Line)
- 1) &&
((ch = FileBuffer[j]) != 0x0D && (ch = FileBuffer[j]) != 0x0A))
{
Line[i] = ch;
Modified: trunk/reactos/tools/cabman/dfp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/dfp.h?rev=556…
==============================================================================
--- trunk/reactos/tools/cabman/dfp.h [iso-8859-1] (original)
+++ trunk/reactos/tools/cabman/dfp.h [iso-8859-1] Thu Feb 16 16:50:16 2012
@@ -97,7 +97,7 @@
char* FileBuffer;
ULONG FileBufferSize;
ULONG CurrentOffset;
- char Line[128];
+ char Line[PATH_MAX + 6]; /* "PATH" xEOL */
ULONG LineLength;
ULONG CurrentLine;
ULONG CurrentChar;