[vlc-devel] [PATCH 2/3] Audioscrobbler: Update the scrobbling protocol to the version 2.0.
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Mar 9 19:31:45 CET 2012
Still 1204 and 1024 ?
Indeed, I'm sorry about that.
That strlen does not seem right at all, it should be buffer maximum so
1024. I would use snprintf in all those key/val printf instead of just
with strings.
Same thing.
On Thu, Mar 8, 2012 at 8:11 AM, Ilkka Ollakka <ileoo at videolan.org> wrote:
> On Wed, Mar 07, 2012 at 11:05:58PM +0100, Samuel Pitoiset wrote:
>
> Hi,
>
> > ---
> > modules/misc/audioscrobbler.c | 268
> +++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 268 insertions(+)
>
> > +++ b/modules/misc/audioscrobbler.c
> > @@ -1181,6 +1181,274 @@ static void HandleInterval(mtime_t *next,
> unsigned int *i_interval)
>
> > + for (i_song = 0 ; i_song < p_sys->i_songs ; i_song++)
> > + {
> > + audioscrobbler_song_t *p_song = &p_sys->p_queue[i_song];
> > + char psz_key[1204], psz_val[1024];
>
> Still 1204 and 1024 ?
>
> > +
> > + /* artist */
> > + sprintf(psz_key, "artist[%d]", i_song);
> > + snprintf(psz_val, strlen(p_song->psz_a) + 1, "%s",
> p_song->psz_a);
>
> That strlen does not seem right at all, it should be buffer maximum so
> 1024. I would use snprintf in all those key/val printf instead of just
> with strings.
>
> --
> Ilkka Ollakka
> "By the time they had diminished from 50 to 8, the other dwarves began
> to suspect 'Hungry' ..."
> -- Gary Larson, "The Far Side"
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
>
--
Best regards,
Samuel Pitoiset.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120309/eb6b79af/attachment.html>
More information about the vlc-devel
mailing list