-
-
usr/src/lib/print/libipp-listener/common/common.c (Diff revision 1) This variable used only when
FORCE_LPSCHED_URI
is defined. -
-
usr/src/lib/print/libipp-listener/common/common.c (Diff revision 1) -
Possible NULL-pointer dereference:
From strtok(3C) manual page:...If no such byte is found, the current token extends to the end of the string pointed to by s1, and subsequent searches for a token return a null pointer.
-
Missing braces.
-
-
usr/src/lib/print/libpapi-common/common/attribute.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libpapi-common/common/attribute.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libpapi-common/common/attribute.c (Diff revision 1) Missing blanks around the
+
operators. -
usr/src/lib/print/libpapi-lpd/common/lpd-job.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libpapi-lpd/common/lpd-job.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libpapi-lpd/common/lpd-misc.c (Diff revision 1) "Each line should contain at most one statement."
-
usr/src/lib/print/libprint/common/list.c (Diff revision 1) Is this
memset()
necessary aftercalloc()
? -
-
usr/src/lib/print/libprint/common/list.c (Diff revision 1) Is this
memset()
necessary aftercalloc()
? -
-
usr/src/lib/print/libprint/common/list.c (Diff revision 1) Is this
memset()
necessary aftercalloc()
? -
usr/src/lib/print/libprint/common/ns_bsd_addr.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libprint/common/ns_bsd_addr.c (Diff revision 1) Typo, this comment line should be:
* ns_bsd_addr_t *a2 - another bsd addr
-
-
usr/src/lib/print/libprint/common/ns_bsd_addr.c (Diff revision 1) "The opening left brace should be at the end of the line beginning the compound statement and the closing right brace should be alone on a line, positioned under the beginning of the compound statement."
-
usr/src/lib/print/libprint/common/ns_bsd_addr.c (Diff revision 1) "...the right brace before the else and the right brace before the while of a do-while statement are the only places where a right brace appears that is not alone on a line."
-
usr/src/lib/print/libprint/common/ns_cmn_printer.c (Diff revision 1) This function declaration should be in /usr/src/lib/print/libprint/common/ns.h, next to the declaration of
ns_kvp_create()
.
(The same problem can be found in /usr/src/lib/print/libprint/common/ns.c, line: 81.) -
usr/src/lib/print/libprint/common/nss_convert.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libprint/common/nss_convert.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libprint/common/nss_convert.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libprint/common/nss_write.c (Diff revision 1) Missing blanks around the
|
operators. -
usr/src/lib/print/libprint/common/nss_write.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
-
usr/src/lib/print/libprint/common/nss_write.c (Diff revision 1) "If one arm of an if-else statement contains braces, all arms should contain braces."
11170 print: NULL pointer errors
Review Request #1955 — Created June 1, 2019 and submitted
Information | |
---|---|
tsoome | |
illumos-gate | |
11170 | |
|
|
c025d55... | |
Reviewers | |
general | |
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/lpd-misc.c:31: ../common/lpd-misc.c: In function 'recvfd': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/lpd-misc.c:86:19: note: in expansion of macro 'NULL' memset(&recv_fd, NULL, sizeof (recv_fd)); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/lpd-misc.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ ../common/common.c: In function 'add_supported_locales': ../common/common.c:253:43: error: comparison between pointer and integer [-Werror] for (i = 0; ((passed == 1) && (name[i] != NULL)); i++) ^~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/lpd-job.c:32: ../common/lpd-job.c: In function 'lpd_add_svr4_attributes': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/lpd-job.c:387:14: note: in expansion of macro 'NULL' memset(tmp, NULL, sizeof (tmp)); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/lpd-job.c:40: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/attribute.c:32: ../common/attribute.c: In function '_process_value': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: incompatible types when initializing type 'enum <anonymous>' using type 'void *' #define NULL ((void *)0) ^ ../common/attribute.c:651:3: note: in expansion of macro 'NULL' NULL ^~~~ ../common/ns_cmn_printer.c: In function 'ns_printer_name_list': ../common/ns_cmn_printer.c:154:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] buf[strlen(buf) - 1] = (char)NULL; ^ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/list.c:30: ../common/list.c: In function 'list_append': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/list.c:61:23: note: in expansion of macro 'NULL' (void) memset(list, NULL, (_list_increment * sizeof (void *))); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from /code/illumos-gate/proto/root_i386/usr/include/strings.h:36, from ../common/list.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/list.c:30: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/list.c:75:28: note: in expansion of macro 'NULL' (void) memset(new_list, NULL, ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from /code/illumos-gate/proto/root_i386/usr/include/strings.h:36, from ../common/list.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/list.c:30: ../common/list.c: In function 'list_concatenate': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/list.c:149:23: note: in expansion of macro 'NULL' (void) memset(list, NULL, (new_size * sizeof (void *))); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from /code/illumos-gate/proto/root_i386/usr/include/strings.h:36, from ../common/list.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ ../common/nss_convert.c: In function 'strncat_escaped': ../common/nss_convert.c:56:13: error: comparison between pointer and integer [-Werror] while ((*t != NULL) && (len > 0)) ^~ ../common/nss_convert.c:62:13: error: comparison between pointer and integer [-Werror] while ((*s != NULL) && (len > 0)) { ^~ ../common/nss_convert.c:67:5: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] *t = NULL; ^ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: ../common/nss_convert.c: In function '_cvt_printer_to_entry': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:80:21: note: in expansion of macro 'NULL' (void) memset(buf, NULL, buflen); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:86:22: note: in expansion of macro 'NULL' (void) memset(buf, NULL, buflen); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:102:22: note: in expansion of macro 'NULL' (void) memset(buf, NULL, buflen); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:124:22: note: in expansion of macro 'NULL' (void) memset(buf, NULL, buflen); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:130:22: note: in expansion of macro 'NULL' (void) memset(buf, NULL, buflen); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: ../common/nss_convert.c: In function '_cvt_nss_entry_to_printer': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:152:21: note: in expansion of macro 'NULL' (void) memset(buf, NULL, sizeof (buf)); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ ../common/nss_convert.c:153:23: error: comparison between pointer and integer [-Werror] for (cp = entry; *cp != NULL; cp++) { ^~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:169:23: note: in expansion of macro 'NULL' (void) memset(buf, NULL, sizeof (buf)); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:176:24: note: in expansion of macro 'NULL' (void) memset(buf, NULL, sizeof (buf)); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0, from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82, from ../common/nss_convert.c:33: /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'memset' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/nss_convert.c:189:24: note: in expansion of macro 'NULL' (void) memset(buf, NULL, sizeof (buf)); ^~~~ In file included from /code/illumos-gate/proto/root_i386/usr/include/string.h:33:0, from ../common/nss_convert.c:37: /code/illumos-gate/proto/root_i386/usr/include/iso/string_iso.h:72:14: note: expected 'int' but argument is of type 'void *' extern void *memset(void *, int, size_t); ^~~~~~ ../common/ns_bsd_addr.c: In function 'string_to_value': ../common/ns_bsd_addr.c:202:54: error: comparison between pointer and integer [-Werror] if ((key != NULL) && (string != NULL) && (string[0] != NULL)) { ^~ ../common/ns_bsd_addr.c: In function 'posix_name': ../common/ns_bsd_addr.c:282:14: error: comparison between pointer and integer [-Werror] if (buf[0] != NULL) { ^~ ../common/nss_write.c: In function 'freadline': ../common/nss_write.c:67:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] *s = NULL; ^ ../common/nss_write.c: In function 'nis_put_printer': ../common/nss_write.c:276:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion] *tmp = NULL; /* strip the .byname */ ^ cc1: all warnings being treated as errors
Change Summary:
rebase on gate. the issues pointed in this review are fixed.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+146 -164) |