mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 13:50:00 -04:00
Merge branch '2421-cid-316509-untrusted-value-as-argument-tainted_scalar' into 'main'
Resolve "CID 316509: Untrusted value as argument (TAINTED_SCALAR)" Closes #2423 and #2421 See merge request isc-projects/bind9!4606
This commit is contained in:
commit
5750f89351
2 changed files with 3 additions and 0 deletions
|
|
@ -302,6 +302,7 @@ tostruct_nsec3(ARGS_TOSTRUCT) {
|
|||
nsec3->iterations = uint16_consume_fromregion(®ion);
|
||||
|
||||
nsec3->salt_length = uint8_consume_fromregion(®ion);
|
||||
INSIST(nsec3->salt_length <= region.length);
|
||||
nsec3->salt = mem_maybedup(mctx, region.base, nsec3->salt_length);
|
||||
if (nsec3->salt == NULL) {
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
|
@ -309,6 +310,7 @@ tostruct_nsec3(ARGS_TOSTRUCT) {
|
|||
isc_region_consume(®ion, nsec3->salt_length);
|
||||
|
||||
nsec3->next_length = uint8_consume_fromregion(®ion);
|
||||
INSIST(nsec3->next_length <= region.length);
|
||||
nsec3->next = mem_maybedup(mctx, region.base, nsec3->next_length);
|
||||
if (nsec3->next == NULL) {
|
||||
goto cleanup;
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ tostruct_nsec3param(ARGS_TOSTRUCT) {
|
|||
nsec3param->iterations = uint16_consume_fromregion(®ion);
|
||||
|
||||
nsec3param->salt_length = uint8_consume_fromregion(®ion);
|
||||
INSIST(nsec3param->salt_length == region.length);
|
||||
nsec3param->salt = mem_maybedup(mctx, region.base,
|
||||
nsec3param->salt_length);
|
||||
if (nsec3param->salt == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue