Skip to content

AccessViolation at ole.c:450 #6

Description

@yangzao

A null-ptr access bug when testing xls2csv 0.95 on x86-64 Ubuntu 22.04.

Files:

1.zip

Commandline:

./xls2csv ./1

Crash line:

    "    446    \t\tlong int sbdSecNum=e->blocks[blk]/sbdPerSector;",
    "    447    \t\tlong int sbdSecMod=e->blocks[blk]%sbdPerSector;",
    "    448    /* \t\tfprintf(stderr, \"calcoffset: e->name=%s e->numOfBlocks=%ld length=%ld sbdSecNum=%ld rootEntry->blocks=%p\\n\",",
    "    449     \t\t\t\t\t\te->name, e->numOfBlocks, e->length, sbdSecNum, rootEntry->blocks);*/",
    "--->450    \t\tres=512 + rootEntry->blocks[sbdSecNum]*sectorSize + sbdSecMod*shortSectorSize;",
    "    451    \t}",
    "    452    \treturn res;",
    "    453    }",
    "    454    ",
    "    455    "

Stacktrace:

    "    #0 0x55555564f3df in calcFileBlockOffset catdoc/src/ole.c:450:13",
    "    #1 0x55555564faf7 in ole_read catdoc/src/ole.c:493:14",
    "    #2 0x555555640d2f in do_table catdoc/src/xlsparse.c:43:3",
    "    #3 0x55555563e8ba in main catdoc/src/xls2csv.c:167:7",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions