Skip to content

AccessViolation at fileutil.c:124 #9

Description

@yangzao

An AccessViolation bug when testing xls2csv 0.95 on x86-64 Ubuntu 22.04.

Files:

4.zip

Commandline:

./xls2csv ./4

Crash line:

    "    120    /*  arguments                                                         */",
    "    121    /**********************************************************************/",
    "    122    char *stradd(const char *s1,const char *s2)",
    "    123    { char *res;",
    "--->124    \tres=malloc(strlen(s1)+strlen(s2)+1);",
    "    125    \tif (!res) {",
    "    126    \t\tfprintf (stderr,\"Out of memory!\");",
    "    127    \t\texit(1);",
    "    128    \t}",
    "    129    \tstrcpy(res,s1);"

Stacktrace:

    "    #0 0x7ffff7d9d7fd  string/../sysdeps/x86_64/multiarch/strlen-avx2.S:74",
    "    #1 0x555555596428 in strlen (xls2csv_asan+0x42428) (BuildId: db4d49f47f3bfd94d5837dadbb004e3c454c2bb8)",
    "    #2 0x555555648e9c in stradd catdoc/src/fileutil.c:124:13",
    "    #3 0x555555645417 in read_charset catdoc/src/charsets.c:79:18",
    "    #4 0x555555641a60 in process_item catdoc/src/xlsparse.c:159:19",
    "    #5 0x55555564113b in do_table catdoc/src/xlsparse.c:116:3",
    "    #6 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