1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-07 00:58:40 +03:00

r16375: Klocwork #1670.

Jeremy.
(This used to be commit 99605ce296663b7697d737fd521f0e4d8436d1f2)
This commit is contained in:
Jeremy Allison 2006-06-19 23:19:24 +00:00 committed by Gerald (Jerry) Carter
parent 5cccafff45
commit 0c88eedbeb

View File

@ -2250,15 +2250,21 @@ SMB_BIG_UINT STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr)
SMB_BIG_UINT val = -1;
const char *p = nptr;
while (p && *p && isspace(*p))
if (!p) {
*entptr = p;
return val;
}
while (*p && isspace(*p))
p++;
#ifdef LARGE_SMB_OFF_T
sscanf(p,"%llu",&val);
#else /* LARGE_SMB_OFF_T */
sscanf(p,"%lu",&val);
#endif /* LARGE_SMB_OFF_T */
if (entptr) {
while (p && *p && isdigit(*p))
while (*p && isdigit(*p))
p++;
*entptr = p;
}