Hi,<br><br>Thanks for the hint. I will correct that.<br><br><div class="gmail_quote">On Sat, Feb 25, 2012 at 8:36 AM, Ilkka Ollakka <span dir="ltr"><<a href="mailto:ileoo@videolan.org">ileoo@videolan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Feb 24, 2012 at 11:08:19PM +0100, Samuel Pitoiset wrote:<br>
<br>
Hi,<br>
<br>
Thanks for the patch, one thing that I spotted that is problematic<br>
<div class="im"><br>
> --- a/modules/misc/audioscrobbler.c<br>
> +++ b/modules/misc/audioscrobbler.c<br>
> @@ -1209,6 +1209,274 @@ static void HandleInterval(mtime_t *next, unsigned int *i_interval)<br>
</div><div class="im">> +<br>
> + vlc_mutex_lock(&p_sys->lock);<br>
> + for (i_song = 0 ; i_song < p_sys->i_songs ; i_song++)<br>
> + {<br>
> + audioscrobbler_song_t *p_song = &p_sys->p_queue[i_song];<br>
> + char psz_key[1204], psz_val[1024];<br>
> +<br>
> + /* album */<br>
> + sprintf(psz_key, "album[%d]", i_song);<br>
> + sprintf(psz_val, "%s", p_song->psz_b);<br>
<br>
</div>I think it would be better to use snprintf here, and is that psz_key<br>
really 1204 and not 1024? So change all sprintf stuff to snprintf<br>
or something safer. This is issue if there is song that has metadata<br>
for example 2000 characters long and you only have 1024 character of<br>
memory where you write it. Atleast I did not spot any checks for<br>
p_song->psz_b length limitting in current core.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Ilkka Ollakka<br>
You will be surprised by a loud noise.<br>
</font></span><br>_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div>Best regards,</div>Samuel Pitoiset.<br><br>