#202 wlan stats segfault

closed-accepted
nobody
Bug fix (69)
5
2012-11-01
2012-10-27
ruikai
No

Sometimes wlan related TEXT causes segment fault, and backtrace shows it's strtok in iw_get_stats.

I read the code of wireless_tools, which says 'strtok not thread safe, not used in WE-12 and later' for iw_get_stats. But it need to first check if has_range and then we_version_compiled.

In conky/src/linux.cc, iw_get_stats is called before iw_get_range_info, hence has_range is always 0 in iw_get_stats and strtok is used. I simply move iw_get_range_info before iw_get_stats and no segfault up to now.

Discussion

  • ruikai

    ruikai - 2012-10-27

    patch created by git diff

     
  • pavelo

    pavelo - 2012-11-01

    Good work in figuring this out. I have committed this into git. Thanks for the patch.

     
  • pavelo

    pavelo - 2012-11-01
    • status: open --> closed-accepted
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks