Coverity-updates archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
New Defects reported by Coverity Scan for NetBSD-i386-user
Hi,
Please find the latest report on new defect(s) introduced to NetBSD-i386-user found with Coverity Scan.
65 new defect(s) introduced to NetBSD-i386-user found with Coverity Scan.
82 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 20 of 65 defect(s)
** CID 270355: Resource leaks (RESOURCE_LEAK)
/external/gpl3/binutils/dist/binutils/objcopy.c: 2464 in copy_object()
________________________________________________________________________________________________________
*** CID 270355: Resource leaks (RESOURCE_LEAK)
/external/gpl3/binutils/dist/binutils/objcopy.c: 2464 in copy_object()
2458
2459 left -= now;
2460 off += now;
2461 }
2462 }
2463 }
>>> CID 270355: Resource leaks (RESOURCE_LEAK)
>>> Variable "buf" going out of scope leaks the storage it points to.
2464 }
2465
2466 /* Allow the BFD backend to copy any private data it understands
2467 from the input BFD to the output BFD. This is done last to
2468 permit the routine to look at the filtered symbol table, which is
2469 important for the ECOFF code at least. */
** CID 274208: (FORWARD_NULL)
/external/gpl3/gdb/dist/bfd/merge.c: 340 in sec_merge_emit()
/external/gpl3/binutils/dist/bfd/merge.c: 340 in sec_merge_emit()
________________________________________________________________________________________________________
*** CID 274208: (FORWARD_NULL)
/external/gpl3/gdb/dist/bfd/merge.c: 340 in sec_merge_emit()
334
335 /* Trailing alignment needed? */
336 off = sec->size - off;
337 if (off != 0)
338 {
339 if (contents)
>>> CID 274208: (FORWARD_NULL)
>>> Passing null pointer "pad" to "memcpy", which dereferences it.
340 memcpy (contents + offset, pad, off);
341 else if (bfd_bwrite (pad, off, abfd) != off)
342 goto err;
343 }
344
345 if (pad != NULL)
/external/gpl3/binutils/dist/bfd/merge.c: 340 in sec_merge_emit()
334
335 /* Trailing alignment needed? */
336 off = sec->size - off;
337 if (off != 0)
338 {
339 if (contents)
>>> CID 274208: (FORWARD_NULL)
>>> Passing null pointer "pad" to "memcpy", which dereferences it.
340 memcpy (contents + offset, pad, off);
341 else if (bfd_bwrite (pad, off, abfd) != off)
342 goto err;
343 }
344
345 if (pad != NULL)
** CID 420802: Resource leaks (RESOURCE_LEAK)
/external/gpl3/gdb/dist/gdb/breakpoint.c: 9657 in create_breakpoint()
________________________________________________________________________________________________________
*** CID 420802: Resource leaks (RESOURCE_LEAK)
/external/gpl3/gdb/dist/gdb/breakpoint.c: 9657 in create_breakpoint()
9651 else
9652 throw_exception (e);
9653 }
9654 END_CATCH
9655
9656 if (VEC_empty (linespec_sals, canonical.sals))
>>> CID 420802: Resource leaks (RESOURCE_LEAK)
>>> Variable "copy_arg" going out of scope leaks the storage it points to.
9657 return 0;
9658
9659 /* Create a chain of things that always need to be cleaned up. */
9660 old_chain = make_cleanup_destroy_linespec_result (&canonical);
9661
9662 /* ----------------------------- SNIP -----------------------------
** CID 991522: (RESOURCE_LEAK)
/external/gpl3/gdb/dist/bfd/elflink.c: 9599 in elf_link_input_bfd()
/external/gpl3/gdb/dist/bfd/elflink.c: 9647 in elf_link_input_bfd()
/external/gpl3/gdb/dist/bfd/elflink.c: 9671 in elf_link_input_bfd()
/external/gpl3/gdb/dist/bfd/elflink.c: 9879 in elf_link_input_bfd()
/external/gpl3/binutils/dist/bfd/elflink.c: 9749 in elf_link_input_bfd()
/external/gpl3/binutils/dist/bfd/elflink.c: 9798 in elf_link_input_bfd()
/external/gpl3/binutils/dist/bfd/elflink.c: 9822 in elf_link_input_bfd()
/external/gpl3/binutils/dist/bfd/elflink.c: 10030 in elf_link_input_bfd()
________________________________________________________________________________________________________
*** CID 991522: (RESOURCE_LEAK)
/external/gpl3/gdb/dist/bfd/elflink.c: 9599 in elf_link_input_bfd()
9593 continue;
9594
9595 /* Get the name of the symbol. */
9596 name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link,
9597 isym->st_name);
9598 if (name == NULL)
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
9599 return FALSE;
9600
9601 /* See if we are discarding symbols with this name. */
9602 if ((flinfo->info->strip == strip_some
9603 && (bfd_hash_lookup (flinfo->info->keep_hash, name, FALSE, FALSE)
9604 == NULL))
/external/gpl3/gdb/dist/bfd/elflink.c: 9647 in elf_link_input_bfd()
9641 osym = *isym;
9642
9643 /* Adjust the section index for the output file. */
9644 osym.st_shndx = _bfd_elf_section_from_bfd_section (output_bfd,
9645 isec->output_section);
9646 if (osym.st_shndx == SHN_BAD)
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
9647 return FALSE;
9648
9649 /* ELF symbols in relocatable files are section relative, but
9650 in executable files they are virtual addresses. Note that
9651 this code assumes that all ELF sections have an associated
9652 BFD section with a reasonable value for output_offset; below
/external/gpl3/gdb/dist/bfd/elflink.c: 9671 in elf_link_input_bfd()
9665 }
9666 }
9667
9668 indx = bfd_get_symcount (output_bfd);
9669 ret = elf_link_output_symstrtab (flinfo, name, &osym, isec, NULL);
9670 if (ret == 0)
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
9671 return FALSE;
9672 else if (ret == 1)
9673 *pindex = indx;
9674 }
9675
9676 if (bed->s->arch_size == 32)
/external/gpl3/gdb/dist/bfd/elflink.c: 9879 in elf_link_input_bfd()
9873 sprintf_vma (buffer, rel->r_info);
9874 (*_bfd_error_handler)
9875 (_("error: %B contains a reloc (0x%s) for section %A "
9876 "that references a non-existent global symbol"),
9877 input_bfd, o, buffer);
9878 bfd_set_error (bfd_error_bad_value);
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
9879 return FALSE;
9880 }
9881
9882 while (h->root.type == bfd_link_hash_indirect
9883 || h->root.type == bfd_link_hash_warning)
9884 h = (struct elf_link_hash_entry *) h->root.u.i.link;
/external/gpl3/binutils/dist/bfd/elflink.c: 9749 in elf_link_input_bfd()
9743 continue;
9744
9745 /* Get the name of the symbol. */
9746 name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link,
9747 isym->st_name);
9748 if (name == NULL)
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
9749 return FALSE;
9750
9751 /* See if we are discarding symbols with this name. */
9752 if ((flinfo->info->strip == strip_some
9753 && (bfd_hash_lookup (flinfo->info->keep_hash, name, FALSE, FALSE)
9754 == NULL))
/external/gpl3/binutils/dist/bfd/elflink.c: 9798 in elf_link_input_bfd()
9792 osym = *isym;
9793
9794 /* Adjust the section index for the output file. */
9795 osym.st_shndx = _bfd_elf_section_from_bfd_section (output_bfd,
9796 isec->output_section);
9797 if (osym.st_shndx == SHN_BAD)
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
9798 return FALSE;
9799
9800 /* ELF symbols in relocatable files are section relative, but
9801 in executable files they are virtual addresses. Note that
9802 this code assumes that all ELF sections have an associated
9803 BFD section with a reasonable value for output_offset; below
/external/gpl3/binutils/dist/bfd/elflink.c: 9822 in elf_link_input_bfd()
9816 }
9817 }
9818
9819 indx = bfd_get_symcount (output_bfd);
9820 ret = elf_link_output_symstrtab (flinfo, name, &osym, isec, NULL);
9821 if (ret == 0)
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
9822 return FALSE;
9823 else if (ret == 1)
9824 *pindex = indx;
9825 }
9826
9827 if (bed->s->arch_size == 32)
/external/gpl3/binutils/dist/bfd/elflink.c: 10030 in elf_link_input_bfd()
10024 sprintf_vma (buffer, rel->r_info);
10025 (*_bfd_error_handler)
10026 (_("error: %B contains a reloc (0x%s) for section %A "
10027 "that references a non-existent global symbol"),
10028 input_bfd, o, buffer);
10029 bfd_set_error (bfd_error_bad_value);
>>> CID 991522: (RESOURCE_LEAK)
>>> Variable "isymbuf" going out of scope leaks the storage it points to.
10030 return FALSE;
10031 }
10032
10033 while (h->root.type == bfd_link_hash_indirect
10034 || h->root.type == bfd_link_hash_warning)
10035 h = (struct elf_link_hash_entry *) h->root.u.i.link;
** CID 1025004: Security best practices violations (TOCTOU)
/usr.bin/make/meta.c: 437 in meta_create()
________________________________________________________________________________________________________
*** CID 1025004: Security best practices violations (TOCTOU)
/usr.bin/make/meta.c: 437 in meta_create()
431 fprintf(debug_file, "Skipping meta for %s: no commands\n",
432 gn->name);
433 goto out;
434 }
435
436 /* make sure these are canonical */
>>> CID 1025004: Security best practices violations (TOCTOU)
>>> Calling function "realpath" that uses "dname" after a check function. This can cause a time-of-check, time-of-use race condition.
437 if (realpath(dname, objdir))
438 dname = objdir;
439
440 /* If we aren't in the object directory, don't create a meta file. */
441 if (!metaCurdirOk && strcmp(curdir, dname) == 0) {
442 if (DEBUG(META))
** CID 1025006: Null pointer dereferences (REVERSE_INULL)
/usr.bin/make/meta.c: 703 in meta_job_error()
________________________________________________________________________________________________________
*** CID 1025006: Null pointer dereferences (REVERSE_INULL)
/usr.bin/make/meta.c: 703 in meta_job_error()
697 }
698 if (gn) {
699 Var_Set(".ERROR_TARGET", gn->path ? gn->path : gn->name, VAR_GLOBAL, 0);
700 }
701 getcwd(cwd, sizeof(cwd));
702 Var_Set(".ERROR_CWD", cwd, VAR_GLOBAL, 0);
>>> CID 1025006: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "pbm" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
703 if (pbm && pbm->meta_fname[0]) {
704 Var_Set(".ERROR_META_FILE", pbm->meta_fname, VAR_GLOBAL, 0);
705 }
706 meta_job_finish(job);
707 }
708
** CID 1025007: (RESOURCE_LEAK)
/usr.bin/make/meta.c: 1393 in meta_oodate()
/usr.bin/make/meta.c: 1393 in meta_oodate()
________________________________________________________________________________________________________
*** CID 1025007: (RESOURCE_LEAK)
/usr.bin/make/meta.c: 1393 in meta_oodate()
1387 * All we can sanely do is set it to .ALLSRC.
1388 */
1389 Var_Delete(OODATE, gn);
1390 Var_Set(OODATE, Var_Value(ALLSRC, gn, &cp), gn, 0);
1391 free(cp);
1392 }
>>> CID 1025007: (RESOURCE_LEAK)
>>> Variable "missingFiles" going out of scope leaks the storage it points to.
1393 return oodate;
1394 }
1395
1396 /* support for compat mode */
1397
1398 static int childPipe[2];
/usr.bin/make/meta.c: 1393 in meta_oodate()
1387 * All we can sanely do is set it to .ALLSRC.
1388 */
1389 Var_Delete(OODATE, gn);
1390 Var_Set(OODATE, Var_Value(ALLSRC, gn, &cp), gn, 0);
1391 free(cp);
1392 }
>>> CID 1025007: (RESOURCE_LEAK)
>>> Variable "missingFiles" going out of scope leaks the storage it points to.
1393 return oodate;
1394 }
1395
1396 /* support for compat mode */
1397
1398 static int childPipe[2];
** CID 1025008: (RESOURCE_LEAK)
/usr.bin/make/meta.c: 614 in meta_mode_init()
/usr.bin/make/meta.c: 620 in meta_mode_init()
________________________________________________________________________________________________________
*** CID 1025008: (RESOURCE_LEAK)
/usr.bin/make/meta.c: 614 in meta_mode_init()
608 /*
609 * We ignore any paths that start with ${.MAKE.META.IGNORE_PATHS}
610 */
611 metaIgnorePaths = Lst_Init(FALSE);
612 Var_Append(MAKE_META_IGNORE_PATHS,
613 "/dev /etc /proc /tmp /var/run /var/tmp ${TMPDIR}", VAR_GLOBAL);
>>> CID 1025008: (RESOURCE_LEAK)
>>> Overwriting "cp" in "cp = Var_Subst(NULL, "${.MAKE.META.IGNORE_PATHS:O:u:tA}", VAR_GLOBAL, 2)" leaks the storage that "cp" points to.
614 cp = Var_Subst(NULL,
615 "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL,
616 VARF_WANTRES);
617 if (cp) {
618 str2Lst_Append(metaIgnorePaths, cp, NULL);
619 }
/usr.bin/make/meta.c: 620 in meta_mode_init()
614 cp = Var_Subst(NULL,
615 "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL,
616 VARF_WANTRES);
617 if (cp) {
618 str2Lst_Append(metaIgnorePaths, cp, NULL);
619 }
>>> CID 1025008: (RESOURCE_LEAK)
>>> Variable "cp" going out of scope leaks the storage it points to.
620 }
621
622 /*
623 * In each case below we allow for job==NULL
624 */
625 void
** CID 1025009: Null pointer dereferences (FORWARD_NULL)
/usr.bin/make/meta.c: 689 in meta_job_error()
________________________________________________________________________________________________________
*** CID 1025009: Null pointer dereferences (FORWARD_NULL)
/usr.bin/make/meta.c: 689 in meta_job_error()
683 BuildMon *pbm;
684
685 if (job != NULL) {
686 pbm = &job->bm;
687 } else {
688 if (!gn)
>>> CID 1025009: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "job".
689 gn = job->node;
690 pbm = &Mybm;
691 }
692 if (pbm->mfp != NULL) {
693 fprintf(pbm->mfp, "*** Error code %d%s\n",
694 status,
** CID 1225085: Resource leaks (RESOURCE_LEAK)
/external/gpl3/binutils/dist/ld/plugin.c: 302 in plugin_get_ir_dummy_bfd()
________________________________________________________________________________________________________
*** CID 1225085: Resource leaks (RESOURCE_LEAK)
/external/gpl3/binutils/dist/ld/plugin.c: 302 in plugin_get_ir_dummy_bfd()
296 {
297 bfd *abfd;
298 bfd_boolean bfd_plugin_target;
299
300 bfd_use_reserved_id = 1;
301 bfd_plugin_target = bfd_plugin_target_p (srctemplate->xvec);
>>> CID 1225085: Resource leaks (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "concat(name, " (symbol from plugin)", NULL)" leaks it.
302 abfd = bfd_create (concat (name, IRONLY_SUFFIX, (const char *) NULL),
303 bfd_plugin_target ? link_info.output_bfd : srctemplate);
304 if (abfd != NULL)
305 {
306 abfd->flags |= BFD_LINKER_CREATED | BFD_PLUGIN;
307 if (!bfd_make_writable (abfd))
** CID 1249927: Insecure data handling (TAINTED_SCALAR)
/external/gpl3/gdb/dist/gdb/exec.c: 375 in exec_file_command()
________________________________________________________________________________________________________
*** CID 1249927: Insecure data handling (TAINTED_SCALAR)
/external/gpl3/gdb/dist/gdb/exec.c: 375 in exec_file_command()
369 for (; (*argv != NULL) && (**argv == '-'); argv++)
370 {;
371 }
372 if (*argv == NULL)
373 error (_("No executable file name was specified"));
374
>>> CID 1249927: Insecure data handling (TAINTED_SCALAR)
>>> Assigning: "filename" = "tilde_expand", which taints "filename".
375 filename = tilde_expand (*argv);
376 make_cleanup (xfree, filename);
377 exec_file_attach (filename, from_tty);
378
379 do_cleanups (cleanups);
380 }
** CID 1351301: Error handling issues (CHECKED_RETURN)
/external/gpl3/binutils/dist/gas/write.c: 364 in record_alignment()
________________________________________________________________________________________________________
*** CID 1351301: Error handling issues (CHECKED_RETURN)
/external/gpl3/binutils/dist/gas/write.c: 364 in record_alignment()
358 int align)
359 {
360 if (seg == absolute_section)
361 return;
362
363 if ((unsigned int) align > bfd_get_section_alignment (stdoutput, seg))
>>> CID 1351301: Error handling issues (CHECKED_RETURN)
>>> Calling "bfd_set_section_alignment" without checking return value (as is done elsewhere 33 out of 35 times).
364 bfd_set_section_alignment (stdoutput, seg, align);
365 }
366
367 int
368 get_recorded_alignment (segT seg)
369 {
** CID 1351302: Error handling issues (CHECKED_RETURN)
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 2014 in obj_elf_init_stab_section()
________________________________________________________________________________________________________
*** CID 1351302: Error handling issues (CHECKED_RETURN)
/external/gpl3/binutils/dist/gas/config/obj-elf.c: 2014 in obj_elf_init_stab_section()
2008 char *p;
2009 char *stabstr_name;
2010 unsigned int stroff;
2011
2012 /* Force the section to align to a longword boundary. Without this,
2013 UnixWare ar crashes. */
>>> CID 1351302: Error handling issues (CHECKED_RETURN)
>>> Calling "bfd_set_section_alignment" without checking return value (as is done elsewhere 33 out of 35 times).
2014 bfd_set_section_alignment (stdoutput, seg, 2);
2015
2016 /* Make space for this first symbol. */
2017 p = frag_more (12);
2018 /* Zero it out. */
2019 memset (p, 0, 12);
** CID 1351303: Control flow issues (DEADCODE)
/external/gpl3/binutils/dist/gas/dw2gencfi.c: 198 in emit_expr_encoded()
________________________________________________________________________________________________________
*** CID 1351303: Control flow issues (DEADCODE)
/external/gpl3/binutils/dist/gas/dw2gencfi.c: 198 in emit_expr_encoded()
192 if (emit_encoding)
193 out_one (encoding);
194
195 code = tc_cfi_reloc_for_encoding (encoding);
196 if (code != BFD_RELOC_NONE)
197 {
>>> CID 1351303: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "howto = bfd_reloc_type_look...".
198 reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput, code);
199 char *p = frag_more (size);
200 md_number_to_chars (p, 0, size);
201 fix_new (frag_now, p - frag_now->fr_literal, size, exp->X_add_symbol,
202 exp->X_add_number, howto->pc_relative, code);
203 }
** CID 1351304: Control flow issues (DEADCODE)
/external/gpl3/binutils/dist/gas/dw2gencfi.c: 1929 in output_fde()
________________________________________________________________________________________________________
*** CID 1351304: Control flow issues (DEADCODE)
/external/gpl3/binutils/dist/gas/dw2gencfi.c: 1929 in output_fde()
1923 if (eh_frame)
1924 {
1925 bfd_reloc_code_real_type code
1926 = tc_cfi_reloc_for_encoding (cie->fde_encoding);
1927 if (code != BFD_RELOC_NONE)
1928 {
>>> CID 1351304: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "howto = bfd_reloc_type_look...".
1929 reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput, code);
1930 char *p = frag_more (4);
1931 md_number_to_chars (p, 0, 4);
1932 fix_new (frag_now, p - frag_now->fr_literal, 4, fde->start_address,
1933 0, howto->pc_relative, code);
1934 }
** CID 1351305: Control flow issues (DEADCODE)
/external/gpl3/binutils/dist/gas/dw2gencfi.c: 2281 in cfi_finish()
________________________________________________________________________________________________________
*** CID 1351305: Control flow issues (DEADCODE)
/external/gpl3/binutils/dist/gas/dw2gencfi.c: 2281 in cfi_finish()
2275 if (EH_FRAME_LINKONCE)
2276 {
2277 if (HANDLED (fde))
2278 continue;
2279 if (seek_next_seg && CUR_SEG (fde) != ccseg)
2280 {
>>> CID 1351305: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "seek_next_seg = 2;".
2281 seek_next_seg = 2;
2282 continue;
2283 }
2284 if (!seek_next_seg)
2285 {
2286 ccseg = CUR_SEG (fde);
** CID 1351306: Integer handling issues (DIVIDE_BY_ZERO)
/external/gpl3/binutils/dist/binutils/dwarf.c: 3121 in display_debug_lines_raw()
________________________________________________________________________________________________________
*** CID 1351306: Integer handling issues (DIVIDE_BY_ZERO)
/external/gpl3/binutils/dist/binutils/dwarf.c: 3121 in display_debug_lines_raw()
3115 printf (_(" Advance PC by constant %s to 0x%s\n"),
3116 dwarf_vmatoa ("u", uladv),
3117 dwarf_vmatoa ("x", state_machine_regs.address));
3118 }
3119 else
3120 {
>>> CID 1351306: Integer handling issues (DIVIDE_BY_ZERO)
>>> In expression "(state_machine_regs.op_index + uladv) / linfo.li_max_ops_per_insn", division by expression "linfo.li_max_ops_per_insn" which may be zero has undefined behavior.
3121 state_machine_regs.address
3122 += ((state_machine_regs.op_index + uladv)
3123 / linfo.li_max_ops_per_insn)
3124 * linfo.li_min_insn_length;
3125 state_machine_regs.op_index
3126 = (state_machine_regs.op_index + uladv)
** CID 1351307: Null pointer dereferences (FORWARD_NULL)
/external/gpl3/binutils/dist/ld/ldexp.c: 323 in update_definedness()
________________________________________________________________________________________________________
*** CID 1351307: Null pointer dereferences (FORWARD_NULL)
/external/gpl3/binutils/dist/ld/ldexp.c: 323 in update_definedness()
317 if (defentry == NULL)
318 einfo (_("%P%F: bfd_hash_lookup failed creating symbol %s\n"), name);
319
320 /* If the symbol was already defined, and not by a script, then it
321 must be defined by an object file or by the linker target code. */
322 ret = TRUE;
>>> CID 1351307: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "defentry".
323 if (!defentry->by_script
324 && (h->type == bfd_link_hash_defined
325 || h->type == bfd_link_hash_defweak
326 || h->type == bfd_link_hash_common))
327 {
328 defentry->by_object = 1;
** CID 1351308: Null pointer dereferences (FORWARD_NULL)
/external/gpl3/binutils/dist/ld/ldexp.c: 288 in definedness_newfunc()
________________________________________________________________________________________________________
*** CID 1351308: Null pointer dereferences (FORWARD_NULL)
/external/gpl3/binutils/dist/ld/ldexp.c: 288 in definedness_newfunc()
282 ret = (struct definedness_hash_entry *)
283 bfd_hash_allocate (table, sizeof (struct definedness_hash_entry));
284
285 if (ret == NULL)
286 einfo (_("%P%F: bfd_hash_allocate failed creating symbol %s\n"), name);
287
>>> CID 1351308: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "ret".
288 ret->by_object = 0;
289 ret->by_script = 0;
290 ret->iteration = 0;
291 return &ret->root;
292 }
293
** CID 1351309: Null pointer dereferences (FORWARD_NULL)
/external/gpl3/binutils/dist/ld/ldlang.c: 1119 in lang_add_input_file()
________________________________________________________________________________________________________
*** CID 1351309: Null pointer dereferences (FORWARD_NULL)
/external/gpl3/binutils/dist/ld/ldlang.c: 1119 in lang_add_input_file()
1113
1114 lang_input_statement_type *
1115 lang_add_input_file (const char *name,
1116 lang_input_file_enum_type file_type,
1117 const char *target)
1118 {
>>> CID 1351309: Null pointer dereferences (FORWARD_NULL)
>>> Comparing "name" to null implies that "name" might be null.
1119 if (name != NULL && *name == '=')
1120 {
1121 lang_input_statement_type *ret;
1122 char *sysrooted_name
1123 = concat (ld_sysroot, name + 1, (const char *) NULL);
1124
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/netbsd-i386-user?tab=overview
To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782
Home |
Main Index |
Thread Index |
Old Index