Skip to content

Fix #8590 - Line "BLR to Source mapping:" may look broken when procedures.rdb$debug_info is queried using remote protocol. #8591

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
18 changes: 1 addition & 17 deletions src/isql/isql.epp
Original file line number Diff line number Diff line change
Expand Up @@ -7755,23 +7755,7 @@ processing_state ISQL_print_item_blob(FILE* fp, const IsqlVar* var, Firebird::IT
break;

buffer[length] = 0;

// Special displays for blr or acl subtypes

if (blob_subtype > isc_blob_text && blob_subtype < isc_blob_max_predefined_subtype)
{
for (char* b = buffer + length - 1; b >= buffer;)
{
if (*b == '\n' || *b == '\t' || *b == BLANK)
*b-- = 0;
else
break;
}

IUTILS_printf2(fp, "%s %s%s", TAB_AS_SPACES, buffer, NEWLINE);
}
else
IUTILS_printf(fp, buffer);
IUTILS_printf(fp, buffer);

} while (true);

Expand Down
9 changes: 5 additions & 4 deletions src/jrd/filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ static void string_put(BlobControl* control, const char* line)
*
**************************************/
const USHORT len = static_cast<USHORT>(strlen(line));
filter_tmp* string = (filter_tmp*) gds__alloc((SLONG) (sizeof(filter_tmp) + len));
filter_tmp* string = (filter_tmp*) gds__alloc((SLONG) (sizeof(filter_tmp) + len + 1));
// FREE: on isc_blob_filter_close in string_filter()
if (!string)
{
Expand All @@ -1375,8 +1375,9 @@ static void string_put(BlobControl* control, const char* line)
return; // & No error handling at this level
}
string->tmp_next = NULL;
string->tmp_length = len;
string->tmp_length = len + 1;
memcpy(string->tmp_string, line, len);
string->tmp_string[len] = '\n';

filter_tmp* prior = (filter_tmp*) control->ctl_data[1];
if (prior)
Expand All @@ -1386,8 +1387,8 @@ static void string_put(BlobControl* control, const char* line)

control->ctl_data[1] = (IPTR) string;
++control->ctl_number_segments;
control->ctl_total_length += len;
control->ctl_max_segment = MAX(control->ctl_max_segment, len);
control->ctl_total_length += len + 1;
control->ctl_max_segment = MAX(control->ctl_max_segment, len + 1);
}


Expand Down
Loading