Diff between bd954700e6314a19c56697a4a617233987f5654e and 1764cea5c7fd4f4a7af06c183822158c1e4c6fe7

Changed Files

File Additions Deletions Status
gobex/gobex.c +1 -1 modified

Full Patch

diff --git a/gobex/gobex.c b/gobex/gobex.c
index fdeb11c..40d6b81 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -1611,7 +1611,7 @@ guint g_obex_setpath(GObex *obex, const char *path, GObexResponseFunc func,
 
 	memset(&data, 0, sizeof(data));
 
-	if (path != NULL && strncmp("..", path, 2) == 0) {
+	if (path != NULL && strlen(path) >= 2 && strncmp("..", path, 2) == 0) {
 		data.flags = 0x03;
 		folder = (path[2] == '/') ? &path[3] : NULL;
 	} else {