s3: Fix Coverity ID 242710 Untrusted pointer read
authorVolker Lendecke <vl@samba.org>
Tue, 15 May 2012 17:26:48 +0000 (19:26 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 15 May 2012 19:37:17 +0000 (21:37 +0200)
According to susv3 we have to make sure that we call isupper with
values only in the range of an unsigned char. This is best achieved
by automatic narrowing through assignment.

source3/utils/net_registry_check.c

index 8d1a91c44b3786e512e28be3bddf963f0be6f3b5..6e455db2d892c2bac8be5413792359ffd79fa47e 100644 (file)
@@ -788,7 +788,7 @@ static int check_tdb_action(struct db_record *rec, void *check_ctx)
                }
 
                if (invalid_path) {
-                       int action;
+                       unsigned char action;
                        if (ctx->opt.output == NULL) {
                                action = first_iter ? 'r' : 's';
                        } else if (ctx->opt.automatic) {