Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing NULL pointer checks after ccnl_malloc(), which is defined to a libc malloc():
src/ccnl-ext-mgmt.c: interfaceaddr = (char**)ccnl_malloc(num_interfacessizeof(char)); src/ccnl-ext-mgmt.c- for(it = 0; it <num_interfaces; ++it) src/ccnl-ext-mgmt.c: interfaceaddr[it] = (char*)ccnl_malloc(130*sizeof(char));
src/ccnl-ext-mgmt.c: fwdprefix[it] = (char*)ccnl_malloc(256*sizeof(char)); src/ccnl-ext-mgmt.c- memset(fwdprefix[it], 0, 256);
src/ccnl-ext-mgmt.c: prefix_a->complen = (int *) ccnl_malloc(sizeof(int)*2); src/ccnl-ext-mgmt.c- prefix_a->complen[0] = strlen("mgmt");
src/ccnl-ext-mgmt.c: prefix_a->comp = (unsigned char *) ccnl_malloc(sizeof(unsigned char)*2); src/ccnl-ext-mgmt.c- prefix_a->comp[0] = (unsigned char *)"mgmt";
src/ccnl-ext-nfnops.c: h = ccnl_malloc(sizeof(int)); src/ccnl-ext-nfnops.c- *h = i2 - i1;
src/ccnl-ext-nfnops.c: cp = ccnl_malloc(strlen(pending)+1); src/ccnl-ext-nfnops.c- strcpy(cp, pending);
src/ccnl-ext-nfnkrivine.c: resolveterm = ccnl_malloc(strlen("RESOLVENAME()")+strlen(lambda_expr)); src/ccnl-ext-nfnkrivine.c- sprintf(resolveterm, "RESOLVENAME(%s)", lambda_expr);
src/ccnl-ext-nfnkrivine.c: int *integer = ccnl_malloc(sizeof(int)); src/ccnl-ext-nfnkrivine.c- integer = strtol((char)c->pkt->content, 0, 0);
src/ccnl-core-util.c: prefix->chunknum = (int*) ccnl_malloc(sizeof(int)); src/ccnl-core-util.c- *prefix->chunknum = chunknum;
src/ccnl-uapi.c: name = (char *) ccnl_malloc (sizeof(char) * (strlen(d_obj->name) +1)); src/ccnl-uapi.c- strncpy (name, d_obj->name, (strlen(d_obj->name) +1)); // because ccnl_URItoPrefix() modifies the first arg
...etc, these are just some examples
The text was updated successfully, but these errors were encountered:
blacksheeep
No branches or pull requests
Missing NULL pointer checks after
ccnl_malloc(), which is defined to a libc malloc():
src/ccnl-ext-mgmt.c: interfaceaddr =
(char**)ccnl_malloc(num_interfacessizeof(char));
src/ccnl-ext-mgmt.c- for(it = 0; it <num_interfaces; ++it)
src/ccnl-ext-mgmt.c: interfaceaddr[it] =
(char*)ccnl_malloc(130*sizeof(char));
src/ccnl-ext-mgmt.c: fwdprefix[it] =
(char*)ccnl_malloc(256*sizeof(char));
src/ccnl-ext-mgmt.c- memset(fwdprefix[it], 0, 256);
src/ccnl-ext-mgmt.c: prefix_a->complen = (int *)
ccnl_malloc(sizeof(int)*2);
src/ccnl-ext-mgmt.c- prefix_a->complen[0] = strlen("mgmt");
src/ccnl-ext-mgmt.c: prefix_a->comp = (unsigned char *)
ccnl_malloc(sizeof(unsigned char)*2);
src/ccnl-ext-mgmt.c- prefix_a->comp[0] = (unsigned char
*)"mgmt";
src/ccnl-ext-nfnops.c: h = ccnl_malloc(sizeof(int));
src/ccnl-ext-nfnops.c- *h = i2 - i1;
src/ccnl-ext-nfnops.c: cp = ccnl_malloc(strlen(pending)+1);
src/ccnl-ext-nfnops.c- strcpy(cp, pending);
src/ccnl-ext-nfnkrivine.c: resolveterm =
ccnl_malloc(strlen("RESOLVENAME()")+strlen(lambda_expr));
src/ccnl-ext-nfnkrivine.c- sprintf(resolveterm,
"RESOLVENAME(%s)", lambda_expr);
src/ccnl-ext-nfnkrivine.c: int *integer =
ccnl_malloc(sizeof(int));
src/ccnl-ext-nfnkrivine.c- integer =
strtol((char)c->pkt->content, 0, 0);
src/ccnl-core-util.c: prefix->chunknum = (int*)
ccnl_malloc(sizeof(int));
src/ccnl-core-util.c- *prefix->chunknum = chunknum;
src/ccnl-uapi.c: name = (char *) ccnl_malloc (sizeof(char) *
(strlen(d_obj->name) +1));
src/ccnl-uapi.c- strncpy (name, d_obj->name, (strlen(d_obj->name)
+1)); // because ccnl_URItoPrefix() modifies the first arg
...etc, these are just some examples
The text was updated successfully, but these errors were encountered: