[Commits] [SCM] claws branch, master, updated. 3.14.0-19-g7734bcf

Michael Rasmussen mir at datanom.net
Sun Aug 21 17:21:58 CEST 2016


On Sun, 21 Aug 2016 17:00:27 +0200 (CEST)
ticho at claws-mail.org wrote:

> 
> - Log -----------------------------------------------------------------
> commit 7734bcfabb5152ae4d91c1e1f2bb7a29d272e26f
> Author: Andrej Kacian <ticho at claws-mail.org>
> Date:   Sun Aug 21 16:58:22 2016 +0200
> 
>     Fix crash when an Atom feed's opening tag doesn't have xmlns attribute.
>     
>     Closes bug #3675.
> 
> diff --git a/src/plugins/rssyl/libfeed/parser.c b/src/plugins/rssyl/libfeed/parser.c
> index 033f800..68694ab 100644
> --- a/src/plugins/rssyl/libfeed/parser.c
> +++ b/src/plugins/rssyl/libfeed/parser.c
> @@ -87,8 +87,9 @@ static void _elparse_start_chooser(void *data,
>  
>  			/* ATOM feed detected, let's check version */
>  			version = feed_parser_get_attribute_value(attr, "xmlns");
> -			if( !strcmp(version, "http://www.w3.org/2005/Atom") ||
> -					!strcmp(version, "https://www.w3.org/2005/Atom") )
> +			if( version != NULL &&
> +					(!strcmp(version, "http://www.w3.org/2005/Atom") ||
> +					 !strcmp(version, "https://www.w3.org/2005/Atom")) )
>  				feedtype = FEED_TYPE_ATOM_10;
>  			else
>  				feedtype = FEED_TYPE_ATOM_03;
> 

I would recommend using g_strcmp0 instead of strcmp since g_strcmp0
handles NULL gracefully.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
The computer can't tell you the emotional story.  It can give you the
exact mathematical design, but what's missing is the eyebrows.
		-- Frank Zappa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/commits/attachments/20160821/846d5472/attachment.sig>


More information about the Commits mailing list