Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/query.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 024d3e21..4a37a338 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -165,6 +165,11 @@ static int query_fileowner(alpm_list_t *targets)
goto targcleanup;
}
+ if(strcmp(filename, "") == 0) {
+ pm_printf(ALPM_LOG_ERROR, _("empty string passed to file owner query\n"));
+ goto targcleanup;
+ }
+
/* trailing '/' causes lstat to dereference directory symlinks */
len = strlen(filename) - 1;
while(len > 0 && filename[len] == '/') {