From: Stanislaw Wadas
> Replace hard coded value of 256 by two constant
> defines, MAX_LENGTH and MAX_PATH_LENGTH
Neither of those names is really very good.
They probably ought to be prefixed with USBG_
Mind you the rest of the file isn't much better.
There are also some 'char name[40];'
And code like:
> static void usbg_write_buf(char *path, char *name, char *file, char *buf)
> {
> - char p[256];
> + char p[MAX_LENGTH];
> FILE *fp;
>
> sprintf(p, "%s/%s/%s", path, name, file);
Is just waiting for a security alert.
David.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html