GNOME Bugzilla – Bug 587586
array subscript is above array bounds
Last modified: 2009-07-02 10:27:14 UTC
Please describe the problem: I just tried to build Factory package dasher-4.10.1-1.4 and the build said CTWLanguageModel.cpp:443:33: warning: array subscript is above array bounds The source code is GenericHeader.szMagic[4] = '\0'; but dasher-4.10.1/Src/DasherCore/LanguageModelling/LanguageModel.h: char szMagic[4]; I agree with the compiler. Suggest code rework. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
It looks as though 4 bytes rather than a NUL-terminated C-string were the intention, so thank you for the report, and it's fixed with http://git.gnome.org/cgit/dasher/commit/?id=81d2c049304caa4a77845409ca5d0f1403d7abf6