#437 eve.c causes segfault

open
nobody
Code (277)
3
2013-02-25
2013-02-22
okdewit
No

Conky 1.9.0 (on Arch Linux, XFDE desktop, with kernel 3.7.9-1),
compiled with --enable-eve (and --prefix=/usr --sysconfdir=/etc --enable-ibm --enable-curl --enable-rss --enable-weather-xoap --enable-imlib2 --enable-wlan --enable-lua --enable-lua-cairo --enable-lua-imlib2)

conkyrc just has a few lines, and conky starts fine, untill I add:
${eve 12345 myverylongkeycode 123456}
it returns a segmentation fault.

I have tried both my normal conkyrc and an empty one, but just adding ${eve} causes a segfault, although in that case it does return a message about eve needing arguments.

I have tried to get to the bottom of this by running gdb and valgrind, but i'm not versed enough to find the exact culprit.
I have rebuilt conky with debug options and replaced:
431 snprintf(p, p_max_size, "%.s", eve(ed->userid, ed->apikey, ed->charid));
and several other lines which had no null-terminated strings, but to no avail.

Discussion

  • okdewit

    okdewit - 2013-02-25
    • priority: 5 --> 3
     
  • okdewit

    okdewit - 2013-02-25

    One step closer to a solution:
    curl_formadd(&post, &last, CURLFORM_COPYNAME, "userID", CURLFORM_COPYCONTENTS, userid, CURLFORM_END);
    curl_formadd(&post, &last, CURLFORM_COPYNAME, "apiKey", CURLFORM_COPYCONTENTS, apikey, CURLFORM_END);
    curl_formadd(&post, &last, CURLFORM_COPYNAME, "characterID", CURLFORM_COPYCONTENTS, charid, CURLFORM_END);
    Should be:
    curl_formadd(&post, &last, CURLFORM_COPYNAME, "keyID", CURLFORM_COPYCONTENTS, userid, CURLFORM_END);
    curl_formadd(&post, &last, CURLFORM_COPYNAME, "vCode", CURLFORM_COPYCONTENTS, apikey, CURLFORM_END);
    curl_formadd(&post, &last, CURLFORM_COPYNAME, "characterID", CURLFORM_COPYCONTENTS, charid, CURLFORM_END);

    Because CCP changed the API.
    HTTPS is also mandatory now.

    I don't know enough C to make a patch myself. Maybe this code shouldn't even be in the conky sourcecode, so i'm focussing on updating existing python scripts to python3 & Eve-API 2.0. Will update here if i'm succesful.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks