Buffer overflow in prayertime/src/astro.c part of libitl_0.7.0.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libitl (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Salam
In libitl-
http://
R4sum = R4[i][0] * cos(R4[i][1] + R4[i][2] * JM);
The R4[] array (declared in in 525) has only one element therefore R[i] where i is always =2 (from previous loop) is an invalid access.
The C compile cannot pick this kind of errors. Other languages do.
By chance memory after R4 is filled with another array declared just after R4 in line 529. So no memory violation happens during runtime.
I don't know how to fix it though. May be replacing i with 0, but then why use a 2D array!
Is this bug linked with the FIXIT comment at line 768?
Anyway this bug doesn't seem to crash the program or alter the good results of prayer times (at least in my simple tests).
Found on:
Ubuntu 14.04.2 LTS
libitl0:
Installed: 0.7.0-3build1
Best regards
Fixed in 0.8.0, currrently in Debian, should enter Ubuntu soon.