Skip to content

Commit

Permalink
Fix segmentation fault when showing help text.
Browse files Browse the repository at this point in the history
Found when running dvbv5-scan (part of coming v4l-utils upgrade).

Backtrace:
#0 hol_entry_help (entry=0x8007e0000, state=0x0, stream=0x8007d3000,
       hhstate=0x7fffffffe5d8) at argp-help.c:1164
#1 hol_help (hol=0x8007df000, state=0x0, stream=0x8007d3000) at argp-help.c:1230
#2 _help (argp=0x7fffffffe750, state=0x0, stream=0x8004fca20, flags=634,
       name=0x2018ce "dvbv5-scan") at argp-help.c:1675
#3 argp_help (argp=0x7fffffffe750, stream=0x8004fca20, flags=634,
       name=0x2018ce "dvbv5-scan") at argp-help.c:1707

Upstream maintainer has been notified.

Approved by:	pi (implicit)
  • Loading branch information
hselasky committed Apr 9, 2020
1 parent e031e63 commit c1f9e9b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion devel/argp-standalone/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= argp-standalone
PORTVERSION= 1.3
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= http://www.lysator.liu.se/~nisse/misc/ \
LOCAL/sem
Expand Down
14 changes: 14 additions & 0 deletions devel/argp-standalone/files/patch-argp-help.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- argp-help.c.orig 2020-04-09 17:39:48 UTC
+++ argp-help.c
@@ -1704,7 +1704,10 @@ Try `%s --help' or `%s --usage' for more information.\
void __argp_help (const struct argp *argp, FILE *stream,
unsigned flags, char *name)
{
- _help (argp, 0, stream, flags, name);
+ struct argp_state state = {
+ .root_argp = argp,
+ };
+ _help (argp, &state, stream, flags, name);
}
#ifdef weak_alias
weak_alias (__argp_help, argp_help)

0 comments on commit c1f9e9b

Please sign in to comment.