curl-library
strippath() crash
From: Gisle Vanem <giva_at_bgnett.no>
Date: Fri, 1 Oct 2004 12:15:18 +0200
Date: Fri, 1 Oct 2004 12:15:18 +0200
A command like "curl --form=@foo .." crashes in strippath()
where strdup() is given an address 1 from basename.
I think this basename() is better:
--- CVS-latest/lib/formdata.c Fri Oct 01 08:36:11 2004
+++ lib/formdata.c Fri Oct 01 12:09:12 2004
@@ -944,7 +944,7 @@
if(s1 && s2) {
path = (s1 > s2? s1 : s2)+1;
}
- else {
+ else if (s1 || s2) {
path = (s1 ? s1 : s2)+1;
}
A drive + driveletter ("c:\") should maybe be handled too?
--gv
Received on 2004-10-01