Buffer overflow in prayertime/src/astro.c part of libitl_0.7.0.

Bug #1423943 reported by Dr Djalel Chefrour
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libitl (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Salam

In libitl-0.7.0/prayertime/src/astro.c +812
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/libitl/utopic/view/head:/prayertime/src/astro.c#L812

    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

Revision history for this message
أحمد المحمودي (Ahmed El-Mahmoudy) (aelmahmoudy) wrote :

Fixed in 0.8.0, currrently in Debian, should enter Ubuntu soon.

Changed in libitl (Ubuntu):
status: New → Fix Released
Revision history for this message
Dr Djalel Chefrour (cdjalel) wrote :

Please put a link to the fix in debian

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.