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.

39 new defect(s) introduced to NetBSD-i386-user found with Coverity Scan.
12 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 39 defect(s)


** CID 742175:  Error handling issues  (CHECKED_RETURN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c: 191 in nvc0_gmtyprog_validate()


________________________________________________________________________________________________________
*** CID 742175:  Error handling issues  (CHECKED_RETURN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c: 191 in nvc0_gmtyprog_validate()
185     nvc0_gmtyprog_validate(struct nvc0_context *nvc0)
186     {
187        struct nouveau_pushbuf *push = nvc0->base.pushbuf;
188        struct nvc0_program *gp = nvc0->gmtyprog;
189     
190        if (gp)
>>>     CID 742175:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "nvc0_program_validate" without checking return value (as is done elsewhere 4 out of 5 times).
191           nvc0_program_validate(nvc0, gp);
192     
193        /* we allow GPs with no code for specifying stream output state only */
194        if (gp && gp->code_size) {
195           const boolean gp_selects_layer = !!(gp->hdr[13] & (1 << 9));
196     

** CID 742183:  Control flow issues  (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_video.c: 321 in nouveau_vpe_mb_mv_header()


________________________________________________________________________________________________________
*** CID 742183:  Control flow issues  (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_video.c: 321 in nouveau_vpe_mb_mv_header()
315           switch (mb->macroblock_modes.bits.field_motion_type) {
316           case PIPE_MPEG12_MO_TYPE_FIELD: goto mv1;
317           case PIPE_MPEG12_MO_TYPE_16x8: goto mv2;
318           case PIPE_MPEG12_MO_TYPE_DUAL_PRIME: {
319           base = NV17_MPEG_CMD_CHROMA_MV_HEADER_MV_SPLIT_HALF_MB;
320              if (frame)
>>>     CID 742183:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "base |= 0x80000U;".
321                 base |= NV17_MPEG_CMD_CHROMA_MV_HEADER_TYPE_FRAME;
322              if (forward)
323                 nouveau_vpe_mb_mv(dec, base, luma, frame, TRUE,
324                                   dec->picture_structure != PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_TOP,
325                                   x, y, mb->PMV[0][0], dec->past, TRUE);
326              if (backward && forward)

** CID 742185:  Control flow issues  (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_surface.c: 788 in nv50_blitter_make_fp()


________________________________________________________________________________________________________
*** CID 742185:  Control flow issues  (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_surface.c: 788 in nv50_blitter_make_fp()
782        } else {
783           unsigned mask = TGSI_WRITEMASK_XYZW;
784     
785           if (mode != NV50_BLIT_MODE_PASS) {
786              mask &= ~TGSI_WRITEMASK_ZW;
787              if (!tex_s)
>>>     CID 742185:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "mask = 1U;".
788                 mask = TGSI_WRITEMASK_X;
789              if (!tex_rgbaz)
790                 mask = TGSI_WRITEMASK_Y;
791           }
792           ureg_MOV(ureg, ureg_writemask(out, mask), ureg_src(data));
793        }

** CID 742196:  Null pointer dereferences  (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_fence.c: 122 in nouveau_fence_del()


________________________________________________________________________________________________________
*** CID 742196:  Null pointer dereferences  (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_fence.c: 122 in nouveau_fence_del()
116           if (fence == screen->fence.head) {
117              screen->fence.head = fence->next;
118              if (!screen->fence.head)
119                 screen->fence.tail = NULL;
120           } else {
121              for (it = screen->fence.head; it && it->next != fence; it = it->next);
>>>     CID 742196:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "it".
122              it->next = fence->next;
123              if (screen->fence.tail == fence)
124                 screen->fence.tail = it;
125           }
126        }
127     

** CID 742197:  Null pointer dereferences  (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c: 1205 in _nvfx_fragprog_translate()


________________________________________________________________________________________________________
*** CID 742197:  Null pointer dereferences  (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c: 1205 in _nvfx_fragprog_translate()
1199        if(fp->insn)
1200           fp->insn[fpc->inst_offset] |= 0x00000001;
1201     
1202        /* Append NOP + END instruction for branches to the end of the program */
1203        fpc->inst_offset = fp->insn_len;
1204        grow_insns(fpc, 4);
>>>     CID 742197:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "fp->insn".
1205        fp->insn[fpc->inst_offset + 0] = 0x00000001;
1206        fp->insn[fpc->inst_offset + 1] = 0x00000000;
1207        fp->insn[fpc->inst_offset + 2] = 0x00000000;
1208        fp->insn[fpc->inst_offset + 3] = 0x00000000;
1209     
1210        if(debug_get_option_nvfx_dump_fp())

** CID 742204:  Program hangs  (INFINITE_LOOP)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv40_verttex.c: 35 in nv40_verttex_validate()


________________________________________________________________________________________________________
*** CID 742204:  Program hangs  (INFINITE_LOOP)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv40_verttex.c: 35 in nv40_verttex_validate()
29     void
30     nv40_verttex_validate(struct nv30_context *nv30)
31     {
32        struct nouveau_pushbuf *push = nv30->base.pushbuf;
33        unsigned dirty = nv30->vertprog.dirty_samplers;
34     
>>>     CID 742204:  Program hangs  (INFINITE_LOOP)
>>>     If "dirty" is initially true then it will remain true.
35        while (dirty) {
36           unsigned unit = ffs(dirty) - 1;
37           struct nv30_sampler_view *sv = (void *)nv30->fragprog.textures[unit];
38           struct nv30_sampler_state *ss = nv30->fragprog.samplers[unit];
39     
40           if (ss && sv) {

** CID 742206:  Control flow issues  (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv30_texture.c: 240 in nv30_sampler_view_create()


________________________________________________________________________________________________________
*** CID 742206:  Control flow issues  (MISSING_BREAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv30_texture.c: 240 in nv30_sampler_view_create()
234        switch (pt->target) {
235        case PIPE_TEXTURE_1D:
236           so->fmt |= NV30_3D_TEX_FORMAT_DIMS_1D;
237           break;
238        case PIPE_TEXTURE_CUBE:
239           so->fmt |= NV30_3D_TEX_FORMAT_CUBIC;
>>>     CID 742206:  Control flow issues  (MISSING_BREAK)
>>>     The above case falls through to this one.
240        case PIPE_TEXTURE_2D:
241        case PIPE_TEXTURE_RECT:
242           so->fmt |= NV30_3D_TEX_FORMAT_DIMS_2D;
243           break;
244        case PIPE_TEXTURE_3D:
245           so->fmt |= NV30_3D_TEX_FORMAT_DIMS_3D;

** CID 742215:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_screen.c: 620 in nv50_tls_alloc()


________________________________________________________________________________________________________
*** CID 742215:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_screen.c: 620 in nv50_tls_alloc()
614     
615        screen->cur_tls_space = util_next_power_of_two(tls_space / ONE_TEMP_SIZE) *
616              ONE_TEMP_SIZE;
617        if (nouveau_mesa_debug)
618           debug_printf("allocating space for %u temps\n",
619                 util_next_power_of_two(tls_space / ONE_TEMP_SIZE));
>>>     CID 742215:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "screen->cur_tls_space * util_next_power_of_two(screen->TPs)" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "__uint64_t" (64 bits, unsigned).
620        *tls_size = screen->cur_tls_space * util_next_power_of_two(screen->TPs) *
621              screen->MPsInTP * LOCAL_WARPS_ALLOC * THREADS_IN_WARP;
622     
623        ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 16,
624                             *tls_size, NULL, &screen->tls_bo);
625        if (ret) {

** CID 742216:  Memory - illegal accesses  (OVERRUN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv30_draw.c: 325 in nv30_render_validate()


________________________________________________________________________________________________________
*** CID 742216:  Memory - illegal accesses  (OVERRUN)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv30_draw.c: 325 in nv30_render_validate()
319           }
320        }
321     
322        /* modify vertex format for correct stride, and stub out unused ones */
323        BEGIN_NV04(push, NV30_3D(VP_UPLOAD_FROM_ID), 1);
324        PUSH_DATA (push, r->vertprog->start);
>>>     CID 742216:  Memory - illegal accesses  (OVERRUN)
>>>     Overrunning array "r->vtxprog" of 16 16-byte elements at element index 4294967295 (byte offset 68719476720) using index "attrib - 1U" (which evaluates to 4294967295).
325        r->vtxprog[attrib - 1][3] |= 1;
326        for (i = 0; i < attrib; i++) {
327           BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4);
328           PUSH_DATAp(push, r->vtxprog[i], 4);
329           r->vtxfmt[i] |= vinfo->size << 8;
330        }

** CID 742226:  Resource leaks  (RESOURCE_LEAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_video.c: 556 in nouveau_create_decoder()


________________________________________________________________________________________________________
*** CID 742226:  Resource leaks  (RESOURCE_LEAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_video.c: 556 in nouveau_create_decoder()
550                                    &mpeg);
551        else
552           ret = nouveau_object_new(dec->chan, 0xbeef3174, NV31_MPEG_CLASS, NULL, 0,
553                                    &mpeg);
554        if (ret < 0) {
555           debug_printf("Creation failed: %s (%i)\n", strerror(-ret), ret);
>>>     CID 742226:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "dec" going out of scope leaks the storage it points to.
556           return NULL;
557        }
558     
559        dec->mpeg = mpeg;
560        dec->base = *templ;
561        dec->base.context = context;

** CID 742229:  Resource leaks  (RESOURCE_LEAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_tex.c: 195 in nv50_create_texture_view()


________________________________________________________________________________________________________
*** CID 742229:  Resource leaks  (RESOURCE_LEAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_tex.c: 195 in nv50_create_texture_view()
189        case PIPE_BUFFER:
190           assert(0); /* should be linear and handled above ! */
191           tic[2] |= NV50_TIC_2_TARGET_BUFFER | NV50_TIC_2_LINEAR;
192           break;
193        default:
194           NOUVEAU_ERR("invalid texture target: %d\n", mt->base.base.target);
>>>     CID 742229:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "view" going out of scope leaks the storage it points to.
195           return FALSE;
196        }
197     
198        tic[3] = (flags & NV50_TEXVIEW_FILTER_MSAA8) ? 0x20000000 : 0x00300000;
199     
200        tic[4] = (1 << 31) | (mt->base.base.width0 << mt->ms_x);

** CID 742231:  Resource leaks  (RESOURCE_LEAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c: 198 in nvc0_create_texture_view()


________________________________________________________________________________________________________
*** CID 742231:  Resource leaks  (RESOURCE_LEAK)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c: 198 in nvc0_create_texture_view()
192           depth /= 6;
193           tic[2] |= NV50_TIC_2_TARGET_CUBE_ARRAY;
194           break;
195        default:
196           NOUVEAU_ERR("unexpected/invalid texture target: %d\n",
197                       mt->base.base.target);
>>>     CID 742231:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "view" going out of scope leaks the storage it points to.
198           return FALSE;
199        }
200     
201        tic[3] = (flags & NV50_TEXVIEW_FILTER_MSAA8) ? 0x20000000 : 0x00300000;
202     
203        if (flags & NV50_TEXVIEW_ACCESS_RESOLVE) {

** CID 742234:  Null pointer dereferences  (REVERSE_INULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_video.c: 384 in nouveau_decoder_surface_index()


________________________________________________________________________________________________________
*** CID 742234:  Null pointer dereferences  (REVERSE_INULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nouveau_video.c: 384 in nouveau_decoder_surface_index()
378        struct nouveau_pushbuf *push = dec->push;
379        struct nouveau_bo *bo_y = nv04_resource(buf->resources[0])->bo;
380        struct nouveau_bo *bo_c = nv04_resource(buf->resources[1])->bo;
381     
382        unsigned i;
383     
>>>     CID 742234:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "buf" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
384        if (!buf)
385           return 8;
386        for (i = 0; i < dec->num_surfaces; ++i) {
387           if (dec->surfaces[i] == buf)
388              return i;
389        }

** CID 742244:  Memory - illegal accesses  (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv30_context.c: 44 in nv30_context_kick_notify()


________________________________________________________________________________________________________
*** CID 742244:  Memory - illegal accesses  (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nv30_context.c: 44 in nv30_context_kick_notify()
38     {
39        struct nouveau_screen *screen;
40        struct nv30_context *nv30;
41     
42        if (!push->user_priv)
43           return;
>>>     CID 742244:  Memory - illegal accesses  (UNINIT)
>>>     Using uninitialized value "nv30".
44        nv30 = container_of(push->user_priv, nv30, bufctx);
45        screen = &nv30->screen->base;
46     
47        nouveau_fence_next(screen);
48        nouveau_fence_update(screen, TRUE);
49     

** CID 742245:    (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c: 533 in nvfx_vertprog_parse_instruction()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c: 463 in nvfx_vertprog_parse_instruction()


________________________________________________________________________________________________________
*** CID 742245:    (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c: 533 in nvfx_vertprog_parse_instruction()
527              NOUVEAU_ERR("bad src file\n");
528              return FALSE;
529           }
530        }
531     
532        for (i = 0; i < finst->Instruction.NumSrcRegs; i++) {
>>>     CID 742245:    (UNINIT)
>>>     Using uninitialized value "src[i].reg". Field "src[i].reg.type" is uninitialized.
533           if(src[i].reg.type < 0)
534              return FALSE;
535        }
536     
537        if(finst->Dst[0].Register.File == TGSI_FILE_ADDRESS &&
538           finst->Instruction.Opcode != TGSI_OPCODE_ARL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c: 463 in nvfx_vertprog_parse_instruction()
457     }
458     
459     static boolean
460     nvfx_vertprog_parse_instruction(struct nvfx_vpc *vpc,
461                 unsigned idx, const struct tgsi_full_instruction *finst)
462     {
>>>     CID 742245:    (UNINIT)
>>>     Declaring variable "src" without initializer.
463        struct nvfx_src src[3], tmp;
464        struct nvfx_reg dst;
465        struct nvfx_reg final_dst;
466        struct nvfx_src none = nvfx_src(nvfx_reg(NVFXSR_NONE, 0));
467        struct nvfx_insn insn;
468        struct nvfx_relocation reloc;

** CID 742247:  Uninitialized variables  (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_surface.c: 914 in nv50_blit_set_src()


________________________________________________________________________________________________________
*** CID 742247:  Uninitialized variables  (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv50_surface.c: 914 in nv50_blit_set_src()
908     nv50_blit_set_src(struct nv50_blitctx *blit,
909                       struct pipe_resource *res, unsigned level, unsigned layer,
910                       enum pipe_format format, const uint8_t filter)
911     {
912        struct nv50_context *nv50 = blit->nv50;
913        struct pipe_context *pipe = &nv50->base.pipe;
>>>     CID 742247:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "templ" without initializer.
914        struct pipe_sampler_view templ;
915        uint32_t flags;
916        enum pipe_texture_target target;
917     
918        target = nv50_blit_reinterpret_pipe_texture_target(res->target);
919     

** CID 742249:  Uninitialized variables  (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c: 813 in nvc0_blit_set_src()


________________________________________________________________________________________________________
*** CID 742249:  Uninitialized variables  (UNINIT)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c: 813 in nvc0_blit_set_src()
807     nvc0_blit_set_src(struct nvc0_blitctx *ctx,
808                       struct pipe_resource *res, unsigned level, unsigned layer,
809                       enum pipe_format format, const uint8_t filter)
810     {
811        struct nvc0_context *nvc0 = ctx->nvc0;
812        struct pipe_context *pipe = &nvc0->base.pipe;
>>>     CID 742249:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "templ" without initializer.
813        struct pipe_sampler_view templ;
814        uint32_t flags;
815        unsigned s;
816        enum pipe_texture_target target;
817     
818        target = nv50_blit_reinterpret_pipe_texture_target(res->target);

** CID 968121:    (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c: 84 in nvc0_decoder_bsp()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c: 101 in nvc0_decoder_bsp()
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c: 145 in nvc0_decoder_bsp()


________________________________________________________________________________________________________
*** CID 968121:    (FORWARD_NULL)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c: 84 in nvc0_decoder_bsp()
78           cfg.nvc0.memtype = 0xfe;
79     
80           /* round up to the nearest mb */
81           bsp_size += (1 << 20) - 1;
82           bsp_size &= ~((1 << 20) - 1);
83     
>>>     CID 968121:    (FORWARD_NULL)
>>>     Dereferencing null pointer "dec->bitplane_bo".
84           ret = nouveau_bo_new(dec->bitplane_bo->device, NOUVEAU_BO_VRAM, 0, bsp_size, &cfg, &tmp_bo);
85           if (ret) {
86              debug_printf("reallocating bsp %u -> %u failed with %i\n",
87                           bsp_bo ? (unsigned)bsp_bo->size : 0, bsp_size, ret);
88              return -1;
89           }
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c: 101 in nvc0_decoder_bsp()
95           union nouveau_bo_config cfg;
96           struct nouveau_bo *tmp_bo = NULL;
97     
98           cfg.nvc0.tile_mode = 0x10;
99           cfg.nvc0.memtype = 0xfe;
100     
>>>     CID 968121:    (FORWARD_NULL)
>>>     Dereferencing null pointer "dec->bitplane_bo".
101           ret = nouveau_bo_new(dec->bitplane_bo->device, NOUVEAU_BO_VRAM, 0, bsp_bo->size * 4, &cfg, &tmp_bo);
102           if (ret) {
103              debug_printf("reallocating inter %u -> %u failed with %i\n",
104                           inter_bo ? (unsigned)inter_bo->size : 0, (unsigned)bsp_bo->size * 4, ret);
105              return -1;
106           }
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c: 145 in nvc0_decoder_bsp()
139        PUSH_DATA (push, comm_addr); // 70c comm
140        PUSH_DATA (push, comm_seq); // 710 seq
141     
142        if (codec != PIPE_VIDEO_FORMAT_MPEG4_AVC) {
143           u32 bitplane_addr;
144     
>>>     CID 968121:    (FORWARD_NULL)
>>>     Dereferencing null pointer "dec->bitplane_bo".
145           bitplane_addr = dec->bitplane_bo->offset >> 8;
146     
147           nouveau_vp3_inter_sizes(dec, 1, &slice_size, &bucket_size, &ring_size);
148           BEGIN_NVC0(push, SUBC_BSP(0x400), 6);
149           PUSH_DATA (push, bsp_addr); // 400 picparm addr
150           PUSH_DATA (push, inter_addr); // 404 interparm addr

** CID 992304:  Null pointer dereferences  (NULL_RETURNS)
/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: 42 in npf_test_load()


________________________________________________________________________________________________________
*** CID 992304:  Null pointer dereferences  (NULL_RETURNS)
/usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: 42 in npf_test_load()
36     	_random_func = rndfunc;
37     }
38     
39     int
40     npf_test_load(const void *xml)
41     {
>>>     CID 992304:  Null pointer dereferences  (NULL_RETURNS)
>>>     Assigning: "npf_dict" = null return value from "prop_dictionary_internalize".
42     	prop_dictionary_t npf_dict = prop_dictionary_internalize(xml);
43     	return npfctl_load(0, npf_dict);
44     }
45     
46     ifnet_t *
47     npf_test_addif(const char *ifname, bool reg, bool verbose)

** CID 1046697:  Control flow issues  (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv84_video.c: 325 in nv84_create_decoder()


________________________________________________________________________________________________________
*** CID 1046697:  Control flow issues  (DEADCODE)
/home/phil/cov/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/nouveau/nv50/nv84_video.c: 325 in nv84_create_decoder()
319              if (!dec->mpeg12_bs)
320                 goto fail;
321              vl_mpg12_bs_init(dec->mpeg12_bs, &dec->base);
322              dec->base.decode_bitstream = nv84_decoder_decode_bitstream_mpeg12;
323           }
324        } else {
>>>     CID 1046697:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "goto fail;".
325           goto fail;
326        }
327     
328        ret = nouveau_client_new(screen->device, &dec->client);
329        if (ret)
330           goto fail;


________________________________________________________________________________________________________
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