Skip to content

Commit d3d5c3a

Browse files
committed
tlshd: Check for an empty string
For completeness, the sanity check at the top of tlshd_keyring_link_session() should check for an empty string in addition to a NULL string pointer. Signed-off-by: Chuck Lever <[email protected]>
1 parent cc49670 commit d3d5c3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tlshd/keyring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ int tlshd_keyring_link_session(const char *keyring)
256256
key_serial_t serial;
257257
long ret;
258258

259-
if (!keyring) {
259+
if (!keyring || keyring[0] == '\0') {
260260
tlshd_log_error("No keyring specified");
261261
return -1;
262262
}

0 commit comments

Comments
 (0)