[FFmpeg-devel] [PATCH] af_pan: Fix sscanf formats to work with buggy sscanf implementations

Nicolas George nicolas.george at normalesup.org
Sat Sep 15 16:45:08 CEST 2012


Le nonidi 29 fructidor, an CCXX, Hendrik Leppkes a écrit :
> If i understand the code correctly, the only place where white space really
> matters is in the places where we manually go against the arg pointer, and
> before those places is a skip_spaces now.
> sscanf itself simply skips any leading spaces in the input, i confirmed
> this on windows and linux.

I could not be sure just reading at the patch, but as I said, if it was
tested for various uses of spaces (and apparently it was), then please go
ahead.

> Leading spaces in the sscanf format string are completely unnecessary, its
> implied by how sscanf works.

Except for a few conversion specifiers, including %[foo].

One last point though:

skip_spaces() is precisely implemented using sscanf(*arg, " %n", &len): how
comes it works while the other places do not?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120915/e1a9ce42/attachment.asc>


More information about the ffmpeg-devel mailing list