mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Warning cleanup: signed meets unsigned. (Adds variable dosearch():outlen.)
This commit is contained in:
parent
9a542f526d
commit
0d7ee548e1
1 changed files with 3 additions and 2 deletions
|
|
@ -1146,14 +1146,15 @@ static int dosearch(
|
|||
int cancel_msgid = -1;
|
||||
|
||||
if( filtpatt != NULL ) {
|
||||
size_t max_fsize = strlen( filtpatt ) + strlen( value ) + 1;
|
||||
size_t max_fsize = strlen( filtpatt ) + strlen( value ) + 1, outlen;
|
||||
filter = malloc( max_fsize );
|
||||
if( filter == NULL ) {
|
||||
perror( "malloc" );
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if( snprintf( filter, max_fsize, filtpatt, value ) >= max_fsize ) {
|
||||
outlen = snprintf( filter, max_fsize, filtpatt, value );
|
||||
if( outlen >= max_fsize ) {
|
||||
fprintf( stderr, "Bad filter pattern: \"%s\"\n", filtpatt );
|
||||
free( filter );
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue