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

buffer overrun in options test #763

mlite opened this Issue Oct 26, 2018 · 1 comment


None yet
2 participants
Copy link

mlite commented Oct 26, 2018

Note that by filing an issue, you agree that you have read and agreed to
our contribution guidelines.

NNG & Platform details.

the code pulled from HEAD:master

Expected Behavior

options test passes

Actual Behavior

options test fails with buffer overrun

The runtime error with backtrace:
DTS_MSG: Stensal C/C++ DTS detected a fatal program error!
DTS_MSG: Continuing the execution will cause unexpected behaviors, abort!
DTS_MSG: Reading 4 bytes at 0xff8a8160 will read undefined values.
DTS_MSG: Diagnostic information:

  • The object to-be-read (start:0xff8a815c, size:4 bytes) is allocated at
  • file:/home/sbuilder/workspace/nng/tests/options.c::29, 1
  • 0xff8a815c 0xff8a815f
  • +------------------------+
  • | the object to-be-read |......
  • +------------------------+
  •                        ^~~~~~~~~~
  •    the read starts at 0xff8a8160 that is right after the object end.
  • Stack trace (most recent call first):
    -[1] file:/home/sbuilder/workspace/nng/src/supplemental/util/options.c::26, 2
    -[2] file:/home/sbuilder/workspace/nng/tests/options.c::29, 1
    -[3] file:/home/sbuilder/workspace/nng/tests/convey.c::1039, 6
    -[4] file:/home/sbuilder/workspace/nng/tests/options.c::29, 1

Steps to Reproduce

options -v -p TEST_PORT 13340


This comment has been minimized.

Copy link

gdamore commented Oct 27, 2018

Yep, we do walk off the end of the args array... oops.

@gdamore gdamore closed this in 1d72edd Oct 27, 2018

@gdamore gdamore added this to the v1.1 milestone Nov 6, 2018

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