Menu

#48 xlhtml : SegFault due to signed/unsigned comparison

open
nobody
None
5
2007-04-18
2007-04-18
Anonymous
No

Hello,

I use the last downloadable version of xlhtml (0.5),
and I observe segfault converting Excel file like the one joined (from http://www.ntca.org/images/wireless07/Glossary.xls\).

The bug occur near the line 1680, due to comparisons mixing signed and unsigned integers.

I browse the code and there are a great mish-mash between the signed and unsigned integer : U16, S16, U32 and S32.
So I added the adequate conversion (cast) near each use of the struct work_sheet fields (U32)first_row, (S32)biggest_row, (U32)max_rows, (U16)first_col, (S16)biggest_col, (U16)max_cols.

I join the corrected source.

I hope there are not other dangerous comparisons and future development will take more attention on the use of signed and unsigned integers.

Discussion

  • Nobody/Anonymous

    Excel example

     
  • m.bruit

    m.bruit - 2007-04-18

    Logged In: YES
    user_id=1772409
    Originator: NO

    I'm sorry but I'm a beginner.

    I thought the interface will allow me add various attachments, but no.
    So I've join one XLS example, but I can't send us the corrected source :-(

    Open a account ang login don't solve anything : I can't comment but not join file.
    I will not add a comment with the 3000 lines of the corrected source ?

     

Log in to post a comment.

MongoDB Logo MongoDB