mario0alberto1 / gnome-mplayer

Automatically exported from code.google.com/p/gnome-mplayer
0 stars 0 forks source link

[PATCH][cppcheck] Using size of pointer buffer instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write sizeof(*buffer) #629

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Running cppcheck against the current dev-version of gnome-mplayer raised to 
warnings, issued in file : src/support.c

Using size of pointer buffer instead of size of its data. This is likely to 
lead to a buffer overflow. You probably intend to write sizeof(*buffer)

Please refer the attached patch that fixes the issue.

Best regards

Ettl Martin

Original issue reported on code.google.com by ettl.mar...@gmail.com on 19 Jul 2012 at 6:40

Attachments:

GoogleCodeExporter commented 8 years ago
I'm not doubting that this is wrong, but what version of cppcheck are you 
using, mine at 1.54 does not report this error.

Original comment by kdeko...@gmail.com on 19 Jul 2012 at 12:12

GoogleCodeExporter commented 8 years ago
Should be fixed in SVN now. Thanks. You should try to enable GIO if you can on 
your system, it helps with a few interesting cases of fetching data.

Original comment by kdeko...@gmail.com on 19 Jul 2012 at 12:25

GoogleCodeExporter commented 8 years ago
Thanks for fixing. What is GIO?

Original comment by ettl.mar...@gmail.com on 20 Jul 2012 at 7:42

GoogleCodeExporter commented 8 years ago
GIO is the I/O system built into GLIB, it allows gnome-mplayer to play files 
over ssh mounts for example.

Original comment by kdeko...@gmail.com on 20 Jul 2012 at 12:31