Hi,
Please find the latest report on new defect(s) introduced to batctl found with Coverity Scan.
1 new defect(s) introduced to batctl found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s)
** CID 62116: Null pointer dereferences (FORWARD_NULL) /sys.c: 154 in print_interfaces()
________________________________________________________________________________________________________ *** CID 62116: Null pointer dereferences (FORWARD_NULL) /sys.c: 154 in print_interfaces() 148 while ((iface_dir = readdir(iface_base_dir)) != NULL) { 149 snprintf(path_buff, PATH_BUFF_LEN, SYS_MESH_IFACE_FMT, iface_dir->d_name); 150 res = read_file("", path_buff, USE_READ_BUFF | SILENCE_ERRORS, 0, 0, 0); 151 if (res != EXIT_SUCCESS) 152 continue; 153
CID 62116: Null pointer dereferences (FORWARD_NULL) Passing null pointer "line_ptr" to "strlen", which dereferences it.
154 if (line_ptr[strlen(line_ptr) - 1] == '\n') 155 line_ptr[strlen(line_ptr) - 1] = '\0'; 156 157 if (strcmp(line_ptr, "none") == 0) 158 goto free_line; 159
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/batctl?tab=overview
To manage Coverity Scan email notifications for "linux-merge@lists.open-mesh.org", click https://scan.coverity.com/subscriptions/edit?email=linux-merge%40lists.open-...
linux-merge@lists.open-mesh.org