Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
f5375b1b
Commit
f5375b1b
authored
Mar 12, 2014
by
Mark Andrews
Browse files
check isc_hex_totext result
parent
1cf8e9c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/named/server.c
View file @
f5375b1b
...
...
@@ -9275,6 +9275,7 @@ generate_salt(unsigned char *salt, size_t saltlen) {
unsigned
char
text
[
512
+
1
];
isc_region_t
r
;
isc_buffer_t
buf
;
isc_result_t
result
;
if
(
saltlen
>
256
)
return
(
ISC_R_RANGE
);
...
...
@@ -9289,7 +9290,8 @@ generate_salt(unsigned char *salt, size_t saltlen) {
r
.
length
=
saltlen
;
isc_buffer_init
(
&
buf
,
text
,
sizeof
(
text
));
isc_hex_totext
(
&
r
,
2
,
""
,
&
buf
);
result
=
isc_hex_totext
(
&
r
,
2
,
""
,
&
buf
);
RUNTIME_CHECK
(
result
==
ISC_R_SUCCESS
);
text
[
saltlen
*
2
]
=
0
;
isc_log_write
(
ns_g_lctx
,
NS_LOGCATEGORY_GENERAL
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment