Skip to content

Commit 39b17e8

Browse files
committed
Remove no-op isc_info_svc_dump_pool_info handler
This SPB item has never worked - items pointer is not advanced after the copy, causing an infinite loop. The handler also reads a network-supplied length without checking it against the SPB buffer boundary. Remove both occurrences in Service::query() and Service::query2(). Per maintainers' feedback, dead code is better deleted than fixed.
1 parent f0b0d0c commit 39b17e8

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

src/jrd/svc.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,18 +1250,6 @@ ISC_STATUS Service::query2(thread_db* /*tdbb*/,
12501250
}
12511251
break;
12521252

1253-
case isc_info_svc_dump_pool_info:
1254-
{
1255-
char fname[MAXPATHLEN];
1256-
size_t length2 = gds__vax_integer(items, sizeof(USHORT));
1257-
if (length2 >= sizeof(fname))
1258-
length2 = sizeof(fname) - 1; // truncation
1259-
items += sizeof(USHORT);
1260-
strncpy(fname, (const char*) items, length2);
1261-
fname[length2] = 0;
1262-
break;
1263-
}
1264-
12651253
case isc_info_svc_get_config:
12661254
// TODO: iterate through all integer-based config values
12671255
// and return them to the client
@@ -1704,17 +1692,6 @@ void Service::query(USHORT send_item_length,
17041692
// need_admin_privs(status, "isc_info_svc_get_env");
17051693
break;
17061694

1707-
case isc_info_svc_dump_pool_info:
1708-
{
1709-
char fname[MAXPATHLEN];
1710-
size_t length2 = gds__vax_integer(items, sizeof(USHORT));
1711-
if (length2 >= sizeof(fname))
1712-
length2 = sizeof(fname) - 1; // truncation
1713-
items += sizeof(USHORT);
1714-
memcpy(fname, items, length2);
1715-
fname[length2] = 0;
1716-
break;
1717-
}
17181695
/*
17191696
case isc_info_svc_get_config:
17201697
// TODO: iterate through all integer-based config values

0 commit comments

Comments
 (0)