Summary: Assertion of (fp!=NULL) should be done before passing fp to strlen funcion
Reviewers: singh.amitesh, Hermet, alok25, mvsovani, vtorri
Subscribers: sachin.dev, cedric
Differential Revision: https://phab.enlightenment.org/D3274
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
register char *cp;
{
register char *fp = mcfind(cs, cp);
- register size_t len = strlen(fp);
+ register size_t len;
assert(fp != NULL);
+ len = strlen(fp);
(void) memmove(fp, fp + len + 1,
cs->smultis - (fp + len + 1 - cs->multis));
cs->smultis -= len;