mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
fix ITS#5005
This commit is contained in:
parent
10264919f4
commit
46ab91eeba
@ -180,7 +180,10 @@ slap_parse_sync_cookie(
|
||||
if ( !strncmp( next, "rid=", STRLENOF("rid=") )) {
|
||||
rid_ptr = next;
|
||||
cookie->rid = strtoul( &rid_ptr[ STRLENOF( "rid=" ) ], &next, 10 );
|
||||
if ( next == rid_ptr || next > end || *next != ',' ) {
|
||||
if ( next == rid_ptr ||
|
||||
next > end ||
|
||||
( *next && *next != ',' ) )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if ( *next == ',' ) {
|
||||
@ -194,7 +197,10 @@ slap_parse_sync_cookie(
|
||||
if ( !strncmp( next, "sid=", STRLENOF("sid=") )) {
|
||||
rid_ptr = next;
|
||||
cookie->sid = strtoul( &rid_ptr[ STRLENOF( "sid=" ) ], &next, 16 );
|
||||
if ( next == rid_ptr || next > end || *next != ',' ) {
|
||||
if ( next == rid_ptr ||
|
||||
next > end ||
|
||||
( *next && *next != ',' ) )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if ( *next == ',' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user