Permalink
Browse files

Fix segfault in linktitle for URLs without a '/' after the hostname.

  • Loading branch information...
tm512 committed Feb 10, 2012
1 parent 92afc3f commit 4de42541723f8e7aaf37b4f3ad7e145cf83cd833
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/modules/linktitle/main.c
@@ -110,7 +110,8 @@ void get_title (char **link, char **ttag)
// Now, we need to strip apart the link
*link = strstr (*link, "://") + 3;
- strstr (*link, "/") [0] = '\0';
+ if (strstr (*link, "/"))
+ strstr (*link, "/") [0] = '\0';
return;
}

0 comments on commit 4de4254

Please sign in to comment.