Repository navigation
schema diff, types, parsers REFACTOR bound the remaining string writes #2628
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
base: devel
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1522,12 +1522,14 @@ schema_mount_compiled_print(const struct lysc_ext_instance *orig_ext, struct lys | |
| sm_data->shared->schemas[i].ctx = ctx_mem; | ||
|
|
||
| /* mount_point */ | ||
| strcpy(*mem, orig_sm_data->shared->schemas[i].mount_point); | ||
| memcpy(*mem, orig_sm_data->shared->schemas[i].mount_point, | ||
| strlen(orig_sm_data->shared->schemas[i].mount_point) + 1); | ||
|
Comment on lines
+1525
to
+1526
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These really do not make sense, I think, so please keep it the way it was. |
||
| sm_data->shared->schemas[i].mount_point = *mem; | ||
| *mem = (char *)*mem + LY_CTXP_MEM_SIZE(strlen(sm_data->shared->schemas[i].mount_point) + 1); | ||
|
|
||
| /* content_id */ | ||
| strcpy(*mem, orig_sm_data->shared->schemas[i].content_id); | ||
| memcpy(*mem, orig_sm_data->shared->schemas[i].content_id, | ||
| strlen(orig_sm_data->shared->schemas[i].content_id) + 1); | ||
|
Comment on lines
+1531
to
+1532
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar, does not make sense changing it. |
||
| sm_data->shared->schemas[i].content_id = *mem; | ||
| *mem = (char *)*mem + LY_CTXP_MEM_SIZE(strlen(sm_data->shared->schemas[i].content_id) + 1); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1578,7 +1578,7 @@ lyd_val_uniq_list_equal(void *val1_p, void *val2_p, ly_bool UNUSED(mod), void *c | |
| ptr = uniq_str; | ||
| LYA_FOR(slist->uniques[u], v) { | ||
| if (v) { | ||
| strcpy(ptr, " "); | ||
| memcpy(ptr, " ", 2); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, makes no sense. Getting rid of |
||
| ++ptr; | ||
| } | ||
| ptr = lysc_path_until((struct lysc_node *)slist->uniques[u][v], &slist->node, LYSC_PATH_LOG, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strdup()should be used instead.