Nonbuffered readline
(upstream git commit b45e7b8b7968855411d6270aa36897431b8e15de) Fix segfault when sending empty tag strings (upstream git commit be44e166c40e9708dbee563dbe6915a5391fe75c)
This commit is contained in:
parent
4a3b232786
commit
de7b1e2ba3
@ -1,8 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.18 2012/05/04 11:05:02 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.19 2012/06/29 09:16:23 dcoppa Exp $
|
||||
|
||||
COMMENT= console based player for last.fm radio streams
|
||||
|
||||
DISTNAME= shell-fm-0.20120417
|
||||
REVISION= 0
|
||||
|
||||
CATEGORIES= audio
|
||||
|
||||
HOMEPAGE= http://nex.scrapping.cc/shell-fm/
|
||||
|
16
audio/shell-fm/patches/patch-source_readline_c
Normal file
16
audio/shell-fm/patches/patch-source_readline_c
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-source_readline_c,v 1.1 2012/06/29 09:16:23 dcoppa Exp $
|
||||
|
||||
Nonbuffered readline
|
||||
(upstream git commit b45e7b8b7968855411d6270aa36897431b8e15de)
|
||||
|
||||
--- source/readline.c.orig Fri Jun 29 11:06:55 2012
|
||||
+++ source/readline.c Fri Jun 29 11:07:40 2012
|
||||
@@ -39,6 +39,8 @@ char * readline(struct prompt * setup) {
|
||||
for(histsize = 0; setup->history && setup->history[histsize]; ++histsize);
|
||||
index = histsize;
|
||||
|
||||
+ canon(0);
|
||||
+
|
||||
while(!eoln) {
|
||||
int key = fgetc(stdin);
|
||||
|
16
audio/shell-fm/patches/patch-source_tag_c
Normal file
16
audio/shell-fm/patches/patch-source_tag_c
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-source_tag_c,v 1.1 2012/06/29 09:16:23 dcoppa Exp $
|
||||
|
||||
Fix segfault when sending empty tag strings
|
||||
(upstream git commit be44e166c40e9708dbee563dbe6915a5391fe75c)
|
||||
|
||||
--- source/tag.c.orig Fri Jun 29 11:07:52 2012
|
||||
+++ source/tag.c Fri Jun 29 11:08:28 2012
|
||||
@@ -222,7 +222,7 @@ void sendtag(char key, char * tagstring, struct hash d
|
||||
if(tagstring) {
|
||||
unsigned length = strlen(tagstring);
|
||||
/* remove trailing commas */
|
||||
- while(tagstring[length-1] == ',')
|
||||
+ while(length > 0 && tagstring[length-1] == ',')
|
||||
tagstring[--length] = 0;
|
||||
|
||||
splt = split(tagstring, ",\n", & nsplt);
|
Loading…
x
Reference in New Issue
Block a user