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

stack-buffer-underflow in LOGVAL #800

Closed
gcbgitbub opened this issue Jun 10, 2019 · 1 comment
Closed

stack-buffer-underflow in LOGVAL #800

gcbgitbub opened this issue Jun 10, 2019 · 1 comment

Comments

@gcbgitbub
Copy link

gcbgitbub commented Jun 10, 2019

Command: ./netconf_nca_ctf_run, Time: 190609-12:26:42.906
==111840==ERROR: AddressSanitizer: stack-buffer-underflow on address 0xfffb143e at pc 0xf6e3b856 bp 0xfffb0e48 sp 0xfffb0a20
READ of size 81 at 0xfffb143e thread T0
#0 0xf6e3b855 in printf_common ../../../sanitizer_common/sanitizer_common_interceptors_format.inc:543
#1 0xf6e3c778 in __interceptor_vasprintf ../../../sanitizer_common/sanitizer_common_interceptors.inc:1132
#2 0xf304f2cc in log_vprintf /opt/open_source/libyang/src/log.c:192
#3 0xf30503dc in ly_vlog /opt/open_source/libyang/src/log.c:818
#4 0xf30bfe38 in resolve_schema_nodeid /opt/open_source/libyang/src/resolve.c:1909
#5 0xf30e944f in lys_find_path /opt/open_source/libyang/src/tree_schema.c:4843

r = parse_schema_nodeid(id, &mod_name, &mod_name_len, &name, &nam_len, &is_relative, NULL, NULL, 1);
if (r < 1) {
LOGVAL(ctx, LYE_PATH_INCHAR, LY_VLOG_NONE, NULL, id[r], &id[r]);
return -1;
}
id[r]-------should be id[-r] ? because r is negative value
example: nodeid is /ietf-netconf-acm:/!!!!!!!!!
r's value is -18

@rkrejci
Copy link
Collaborator

rkrejci commented Jun 10, 2019

Thanks for reporting the issue!

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

2 participants