[pacman-dev] [PATCH v2 libalpm] Fix bug inproperly detecting whether a filename doesn't exist
Ryo Munakata
ryomnktml at gmail.com
Tue Jul 15 06:21:48 EDT 2014
'filebase' is a pointer to char
and we want to check whether the 'url' contains a filename
by checking the result of strrchr points to '\0'
So we have to dereference 'filebase' when doing that
Nothing but the commit message has changed from v1
Signed-off-by: Ryo Munakata <ryomnktml at gmail.com>
---
lib/libalpm/dload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 88ea427..c5a56b5 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -652,7 +652,7 @@ static char *filecache_find_url(alpm_handle_t *handle, const char *url)
}
filebase++;
- if(filebase == '\0') {
+ if(*filebase == '\0') {
return NULL;
}
--
2.0.1
More information about the pacman-dev
mailing list