From: Marc Hoersken Date: Fri, 18 Apr 2014 21:53:48 +0000 (+0200) Subject: tftp.c: fix possible dereference of null pointer X-Git-Tag: curl-7_37_0~140 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f74e149f88fef5419504439e0adee0d517d9033;p=thirdparty%2Fcurl.git tftp.c: fix possible dereference of null pointer --- diff --git a/lib/tftp.c b/lib/tftp.c index 269d10f7ad..03a84e6311 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -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);