texinfo: fix crash when searching for backspace.
This commit is contained in:
parent
6a65f46fdc
commit
f27cee4959
49
srcpkgs/texinfo/patch/svn7907.patch
Normal file
49
srcpkgs/texinfo/patch/svn7907.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
fix crash in incremental search for \
|
||||||
|
|
||||||
|
--- info/search.c 2017/07/05 17:56:51 7906
|
||||||
|
+++ info/search.c 2017/07/05 19:16:44 7907
|
||||||
|
@@ -174,8 +174,8 @@
|
||||||
|
state->match_count = match_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* Search BUFFER for REGEXP. Pass back the list of matches
|
||||||
|
- in MATCH_STATE. */
|
||||||
|
+/* Search BUFFER for REGEXP. If matches are found, pass back the list of
|
||||||
|
+ matches in MATCH_STATE. */
|
||||||
|
enum search_result
|
||||||
|
regexp_search (char *regexp, int is_literal, int is_insensitive,
|
||||||
|
char *buffer, size_t buflen,
|
||||||
|
@@ -201,6 +201,7 @@
|
||||||
|
char *buf = xmalloc (size);
|
||||||
|
regerror (result, &preg, buf, size);
|
||||||
|
info_error (_("regexp error: %s"), buf);
|
||||||
|
+ free (buf);
|
||||||
|
return search_invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -215,7 +216,10 @@
|
||||||
|
extend_matches (match_state);
|
||||||
|
|
||||||
|
if (match_state->match_count == 0)
|
||||||
|
- return search_not_found;
|
||||||
|
+ {
|
||||||
|
+ free_matches (match_state);
|
||||||
|
+ return search_not_found;
|
||||||
|
+ }
|
||||||
|
else
|
||||||
|
return search_success;
|
||||||
|
}
|
||||||
|
--- info/session.c 2017/07/05 17:56:51 7906
|
||||||
|
+++ info/session.c 2017/07/05 19:16:44 7907
|
||||||
|
@@ -3953,10 +3953,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result != search_success)
|
||||||
|
- {
|
||||||
|
- free_matches (&matches);
|
||||||
|
- return result;
|
||||||
|
- }
|
||||||
|
+ return result;
|
||||||
|
|
||||||
|
if (node->flags & N_Simple)
|
||||||
|
{
|
@ -1,7 +1,7 @@
|
|||||||
# Template file for 'texinfo'
|
# Template file for 'texinfo'
|
||||||
pkgname=texinfo
|
pkgname=texinfo
|
||||||
version=6.4
|
version=6.4
|
||||||
revision=1
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--disable-static"
|
configure_args="--disable-static"
|
||||||
hostmakedepends="perl ncurses-devel"
|
hostmakedepends="perl ncurses-devel"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user