Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It exists a buffer overflow when use wbook_new() #8

Open
fantasyoung opened this issue Dec 18, 2018 · 0 comments
Open

It exists a buffer overflow when use wbook_new() #8

fantasyoung opened this issue Dec 18, 2018 · 0 comments

Comments

@fantasyoung
Copy link

fantasyoung commented Dec 18, 2018

Description

When specify a long name as argument,it will be buffer overflow

My test program

example1.zip

Command and argument

gcc -fsanitize=address -ggdb -o exampletest example1.c ../src/*.c -I ../include/

Crash Information

The output of exampletest with address sanitizer enabled

=================================================================
==11044==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000004c (pc 0x00000040b7bc bp 0x7ffc15bedf80 sp 0x7ffc15bedf50 T0)
    #0 0x40b7bb in wbook_addworksheet ../src/workbook.c:125
    #1 0x401248 in main /home/wind/libexcel/libexcel-master/tests/example1.c:31
    #2 0x7fee4afe482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #3 0x401148 in _start (/home/wind/libexcel/libexcel-master/tests/exampletest+0x401148)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../src/workbook.c:125 wbook_addworksheet
==11044==ABORTING

CREDIT

pu!m,Huawei Weiran Labs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant