Author: Chris David Date: To: yaffs CC: manningc2 Subject: Re: [Yaffs] Maybe using a YFREED string in yaffs_DeleteSymLink
Hello Charles,
I have a new thought.
Perhaps
static YCHAR *yaffs_CloneString(const YCHAR *str)
could be changed to:
static YCHAR *yaffs_CloneString(const YCHAR *str, unsigned int len)
and then would pass len into strncpy, instead of using strcpy, and
NULL terminate the resulting string.
-or-
something like this could be added each time after a
yaffs_ObjectHeader is read from disk.
oh->alias[YAFFS_MAX_ALIAS_LENGTH] = 0;
Either would eliminate the possibilty of reading past the oh->alias
buffer boundary.