Permalink
Browse files

Fixed SEGV when sending empty tag strings.

  • Loading branch information...
Jonas Kramer
Jonas Kramer committed Jun 26, 2012
1 parent b45e7b8 commit be44e166c40e9708dbee563dbe6915a5391fe75c
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/tag.c
View
@@ -222,7 +222,7 @@ void sendtag(char key, char * tagstring, struct hash data) {
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);

0 comments on commit be44e16

Please sign in to comment.