Menu

#7 extra errorcheck and feature check.

closed-fixed
None
5
2005-03-30
2003-12-27
No

After the switch to the linux-2.6.0 kernel, tvtime
crashed when trying to do videoinput_do_mute, because
of a stack smash attack. This was detected using GCC
with the ProPolice patches. Looking into the problem,
it appeared that somehow the volume control is disabled
on my WinTV card. Adding a check to
videoinput_set_control_v4l2: if (query.flags &
V4L2_CTRL_FLAG_DISABLED ) didn't solve the crash,
unless i did it twice. After i also checked the result
of the ioctl to actually set the volume, the previosly
mentioned check misteriously now (misteriously) also
works the first time..

Now that i added an error check to the setting ioctl, i
noticed that:

Error setting control 'Brightness': Bad address
Error setting control 'Contrast': Bad address
Error setting control 'Saturation': Bad address
Error setting control 'Hue': Bad address

When i remove the V4L2_CTRL_FLAG_DISABLED check, it says:

Error setting control '42': Bad address

So there's really something strange going on...

Anyway, here's the patch i made for being able to use
my commodore 64 again ;-)

Cheers, and thanks for this terrific application!

Martijn

Discussion

  • Martijn Lina

    Martijn Lina - 2003-12-27

    extra error check and feature check.

     
  • Billy Biggs

    Billy Biggs - 2004-05-30
    • assigned_to: nobody --> vektor
     
  • Billy Biggs

    Billy Biggs - 2004-05-30

    Logged In: YES
    user_id=153320

    What's the status of this patch? Is it still required?

     
  • Martijn Lina

    Martijn Lina - 2004-05-31

    Logged In: YES
    user_id=11154

    The problem still exists with linux-2.6.6 but i noticed now
    that it only crashes the way i described when tvtime is
    started for the second time.

    I have to add that i'm not an v4l expert and haven't had the
    time to become one, so my patch is only there to make it
    work for me and i wanted to share it in case someone else
    has the same problem.

     
  • Billy Biggs

    Billy Biggs - 2005-03-30
    • milestone: --> Patch against CVS tvtime
    • status: open --> closed-fixed
     
  • Billy Biggs

    Billy Biggs - 2005-03-30

    Logged In: YES
    user_id=153320

    Thanks, I have applied the patch for the next release.
    FWIW, this really shouldn't "fix" anything, there's a driver
    bug here somewhere I think.

     

Log in to post a comment.