pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/44543: audio/mpg123 incorrectly interprets return value of getaddrinfo
>Number: 44543
>Category: pkg
>Synopsis: audio/mpg123 incorrectly interprets return value of getaddrinfo
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 10 03:35:03 +0000 2011
>Originator: Taylor R Campbell <campbell+netbsd%mumble.net@localhost>
>Release: NetBSD 5.1_STABLE
>Organization:
>Environment:
System: NetBSD smalltalk.local 5.1_STABLE NetBSD 5.1_STABLE (RIADEBUG) #0: Tue
Feb 1 20:28:45 UTC 2011
root%smalltalk.local@localhost:/home/riastradh/netbsd/5/obj/sys/arch/i386/compile/RIADEBUG
i386
Architecture: i386
Machine: i386
>Description:
mpg123 assumes that only negative values from getaddrinfo imply
errors, whereas in fact any nonzero value implies error, and on
NetBSD, the GAI_* values are positive, so that if the resolver
fails on NetBSD, then mpg123 crashes when interprets garbage as
a struct addrinfo pointer.
>How-To-Repeat:
Install audio/mpg123. Then:
% mpg123 http://bogus.nonexistent/
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.12.5; written and copyright by Michael Hipp and others
free software (LGPL/GPL) without any warranty but with best wishes
[resolver.c:306] error: Cannot resolve/connect to bogus.nonexistent:80!
zsh: segmentation fault (core dumped) mpg123 http://bogus.nonexistent/
%
>Fix:
Add the following patch to audio/mpg123/patches:
$NetBSD$
--- src/resolver.c.orig 2010-10-04 06:23:26.000000000 +0000
+++ src/resolver.c
@@ -283,7 +283,7 @@ int open_connection(mpg123_string *host,
#endif
addrcount = getaddrinfo(host->p, port->p, &hints, &addrlist);
- if(addrcount <0)
+ if(addrcount != 0)
{
error3("Resolving %s:%s: %s", host->p, port->p,
gai_strerror(addrcount));
return -1;
Home |
Main Index |
Thread Index |
Old Index