On Thu, 2005-11-17 at 18:37 +0100, Hans Verkuil wrote:
> On Thursday 17 November 2005 11:51, Sigmund Augdal Helberg wrote:
> > The following small patch fixes a stack overflow and subsequent
> > segfault in ivtv-detect.
> >
> > Signed-off-by: Sigmund Augdal Helberg <[EMAIL PROTECTED]>
> > Index: ivtv-detect.c
> > ===================================================================
> > --- ivtv-detect.c (revision 2972)
> > +++ ivtv-detect.c (working copy)
> > @@ -32,7 +32,7 @@
> >
> > // device -1 is a special code for the device names without a number
> > #define MINDEV -1
> > -#define MAXDEV 15
> > +#define MAXDEV 100
> >
> > struct stream_info {
> > char name[100];
> > @@ -104,7 +104,7 @@
> > int maxdev = 0;
> > int i;
> >
> > - for (i = -1; i < 100; i++) {
> > + for (i = MINDEV; i < MAXDEV; i++) {
> > char num[10] = "";
> > int j;
>
> Applied. Thank you!
>
> This code should really be rewritten in C++, it was originally quickly
> hacked together, but it is quite useful and deserves better code.
IMHO this should be integrated into hal. Along with similar code for
"ordinary" v4l and for dvb. Other features that might be useful is to
output which input there is a detected signal on, and possibly
autodetected video norm etc.
As a side-note, is there a channel scan program? I have a simple wrapper
around ivtv-tune that does this, but figure it probably be better to
have it integrated, and output the findings in some sensible format. If
no such program exists, and one is wanted then I will consider writing
one.
Regards,
Sigmund
>
> Hans
>
> _______________________________________________
> ivtv-devel mailing list
> [email protected]
> http://ivtvdriver.org/mailman/listinfo/ivtv-devel
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel