Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ivtv: devel

cx18: [PATCH] fix bounds check in cx18_stream_alloc()

 

 

ivtv devel RSS feed   Index | Next | Previous | View Threaded


cwalls at radix

Mar 7, 2008, 8:11 PM

Post #1 of 2 (1303 views)
Permalink
cx18: [PATCH] fix bounds check in cx18_stream_alloc()

In cx18_stream_alloc(), s->mdl_offset was being used
uninitialized/memset to 0 in the call to cx18_stream_alloc(), for every
stream, to do a bounds check on accumulated allocations. This appears
to be incorrect.

I believe the intent was to use the current running total in
cx->mdl_offset to perform the bounds check.

Please inspect the attached patch to make sure it makes sense. I'm not
100% sure of my current understanding of the mdl_offset variables.

Regards,
Andy
Attachments: cx18-stream_alloc-check.patch (0.77 KB)


hverkuil at xs4all

Mar 8, 2008, 3:05 AM

Post #2 of 2 (1202 views)
Permalink
Re: cx18: [PATCH] fix bounds check in cx18_stream_alloc() [In reply to]

On Saturday 08 March 2008 05:11:50 Andy Walls wrote:
> In cx18_stream_alloc(), s->mdl_offset was being used
> uninitialized/memset to 0 in the call to cx18_stream_alloc(), for
> every stream, to do a bounds check on accumulated allocations. This
> appears to be incorrect.
>
> I believe the intent was to use the current running total in
> cx->mdl_offset to perform the bounds check.
>
> Please inspect the attached patch to make sure it makes sense. I'm
> not 100% sure of my current understanding of the mdl_offset
> variables.
>
> Regards,
> Andy

Hi Andy,

Thanks, committed. It was indeed a wrong check and your patch fixed it.
Under normal circumstances this bug will not cause any problems, only
if you try to allocate a really large number of buffers.

Regards,

Hans

_______________________________________________
ivtv-devel mailing list
ivtv-devel [at] ivtvdriver
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

ivtv devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.