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

sg_logs: Fix parameter lengths in show_data_compression_page #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sg_logs_vendor.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ show_data_compression_page(const uint8_t * resp, int len,
js_pcb(jsp, jo3p, bp[2]);
}
/* variable length integer, max length 8 bytes */
ull = sg_get_unaligned_be(pl - 4, bp + 4);
ull = sg_get_unaligned_be(pl, bp + 4);
ccp = NULL;
is_x100 = false;
is_pr = false;
Expand Down Expand Up @@ -536,7 +536,7 @@ show_data_compression_page(const uint8_t * resp, int len,
default:
sgj_pr_hr(jsp, " unknown %s = 0x%x, contents in hex:\n", param_c,
pc);
hex2str(bp + 4, pl - 4, " ", op->h2s_oformat, blen, b);
hex2str(bp + 4, pl, " ", op->h2s_oformat, blen, b);
sgj_pr_hr(jsp, "%s\n", b);
is_pr = true;
break;
Expand Down