[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41260] regression in urlread: second return v

From: Rik
Subject: [Octave-bug-tracker] [bug #41260] regression in urlread: second return value may be undefined
Date: Fri, 17 Jan 2014 17:21:17 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0

Follow-up Comment #4, bug #41260 (project octave):

The problem bit of code is this section at line 557 of urlwrite.cc:

if (curl.good ())
    if (nargout > 0)
        // Return empty string if no error occured.
        retval(2) = curl.good () ? "" : curl.lasterror ();
        retval(1) = curl.good ();
        retval(0) = buf.str ();

if (nargout < 2 && ! curl.good ())
  error ("urlread: %s", curl.lasterror().c_str());

As you can see, if the curl call fails retval is not assigned to which leaves
missing values for the second and third return arguments.  It looks pretty
easy to fix, but I'm going to just add jwe to the CC list since he was the one
who was changing this code back in October. 


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]