null-pointer check (coverity result)

This commit is contained in:
Enno Rehling 2016-01-17 19:03:30 +01:00
parent 52e517b98d
commit 2b0a2750ba
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ int password_verify(const char * pwhash, const char * passwd) {
assert(pwhash[0] == '$');
algo = pwhash[1] - '0';
pos = strchr(pwhash+2, '$');
assert(pos[0] == '$');
assert(pos && pos[0] == '$');
++pos;
dol = strchr(pos, '$');
assert(dol>pos && dol[0] == '$');