[vlc-devel] [PATCH 2/3] Audioscrobbler: Update the scrobbling protocol to the version 2.0.
Ilkka Ollakka
ileoo at videolan.org
Thu Mar 8 08:11:20 CET 2012
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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120308/19e77ed0/attachment.sig>
More information about the vlc-devel
mailing list