#232 soi3cap.c: wrong array index alpha_args[2]

closed-fixed
nobody
devices (22)
5
2013-02-14
2013-02-14
nafraf
No

error detected by cppcheck:
[src/spicelib/devices/soi3/soi3cap.c:96]: (error) Array 'alpha_args[2]' accessed at index 2, which is out of bounds.
[src/spicelib/devices/soi3/soi3cap.c:97]: (error) Array 'alpha_args[2]' accessed at index 3, which is out of bounds.
[src/spicelib/devices/soi3/soi3cap.c:98]: (error) Array 'alpha_args[2]' accessed at index 4, which is out of bounds.

SOI3CAP input variables define double alpha_args[2]
but in line 96-98:
Dalpha_Dvdb = alpha_args[2];
Dalpha_Dvsb = alpha_args[3];
Dalpha_DdeltaT = alpha_args[4];

Discussion

  • Robert Larice
    Robert Larice
    2013-02-14

    • status: open --> closed-fixed
     
  • Robert Larice
    Robert Larice
    2013-02-14

    Thank You,
    though incorrect this was actually without consequence.
    This is fixed now.
    Robert