Cygwin: TEST only: Add a buffer underrun assertion to symlink_info::check

Thanks to Ken Harris <Ken.Harris@mathworks.com> for the diagnosis
which led to a buffer underrun in this loop.

Revert before release.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2018-05-29 18:04:14 +02:00
parent 4a3d0a5a5d
commit 7d00a5e320
1 changed files with 2 additions and 1 deletions

View File

@ -57,6 +57,7 @@
#include <sys/param.h>
#include <sys/cygwin.h>
#include <wctype.h>
#include <assert.h>
#include "cygerrno.h"
#include "path.h"
#include "fhandler.h"
@ -2800,7 +2801,7 @@ restart:
if (*p != '.' && *p != ' ')
{
while (*--p != '\\')
;
assert(p >= path);
if (*++p != ' ')
p = NULL;
}