iscsi: fix segfault in url parsing
PATCH 1/1 iscsi: fix segfault in url parsing
If an invalid URL is specified iscsi_get_error(iscsi) is called with iscsi == NULL.
Signed-off-by Peter Lieven <[email protected]>
--- block/iscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
block/iscsi.c +1 -2
@@ -947,8 +947,7 @@ static int iscsi_open(BlockDriverState *bs, const char *filename, int flags) iscsi_url =iscsi_parse_full_url (iscsi, filename);if (iscsi_url ==NULL ) { -error_report ("Failed to parse URL : %s %s" , filename, -iscsi_get_error (iscsi)); +error_report ("Failed to parse URL : %s" , filename); ret = -EINVAL ; goto out; }
Signature · 1 line
1.7.9.5
Acked-by [email protected]
Quoted 26 lines · Peter Lieven
If an invalid URL is specified
iscsi_get_error(iscsi)is called with iscsi == NULL.Signed-off-by Peter Lieven <[email protected]>--- block/iscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)block/iscsi.c +1
-2@@ -947,8 +947,7 @@ static int iscsi_open(BlockDriverState *bs, const char *filename, int flags) iscsi_url =iscsi_parse_full_url (iscsi, filename);if (iscsi_url ==NULL ) { -error_report ("Failed to parse URL : %s %s" , filename, -iscsi_get_error (iscsi)); +error_report ("Failed to parse URL : %s" , filename); ret = -EINVAL ; goto out;}--
1.7.9.5
Paolo Bonzini
AppliedIl 15/11/2012 15:42, Peter Lieven ha scritto:
Quoted 4 lines
If an invalid URL is specified
iscsi_get_error(iscsi)is called with iscsi == NULL.Signed-off-by Peter Lieven <[email protected]>
Applied to scsi-next branch, but next time please disable format=flowed if you want to send patches with Thunderbird. It mangles whitespace.
Paolo
Quoted 19 lines
--- block/iscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)block/iscsi.c +1
-2@@ -947,8 +947,7 @@ static int iscsi_open(BlockDriverState *bs, const char *filename, int flags) iscsi_url =iscsi_parse_full_url (iscsi, filename);if (iscsi_url ==NULL ) { -error_report ("Failed to parse URL : %s %s" , filename, -iscsi_get_error (iscsi)); +error_report ("Failed to parse URL : %s" , filename); ret = -EINVAL ; goto out;}