]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tftp.c: fix possible dereference of null pointer
authorMarc Hoersken <info@marc-hoersken.de>
Fri, 18 Apr 2014 21:53:48 +0000 (23:53 +0200)
committerMarc Hoersken <info@marc-hoersken.de>
Fri, 18 Apr 2014 21:53:48 +0000 (23:53 +0200)
lib/tftp.c

index 269d10f7adb32e9618d4a8f81cc603d6723450a7..03a84e6311eab6b81789cd952474ddcc62e7237b 100644 (file)
@@ -1320,7 +1320,10 @@ static CURLcode tftp_do(struct connectdata *conn, bool *done)
     if(code)
       return code;
   }
+
   state = (tftp_state_data_t *)conn->proto.tftpc;
+  if(!state)
+    return CURLE_BAD_CALLING_ORDER;
 
   code = tftp_perform(conn, done);