Skip to content

Commit 1d9a335

Browse files
committed
clients/upsclient.c: upscli_authenticate(): reduce buf sizes for result to fit UPSCLI_NETBUF_LEN [#3329]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent daab2e8 commit 1d9a335

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

clients/upsclient.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3216,7 +3216,7 @@ int upscli_upserror(UPSCONN_t *ups)
32163216
int upscli_authenticate(UPSCONN_t *ups, const char *username, const char *password,
32173217
int check_os_user, int ask_password)
32183218
{
3219-
char buf[UPSCLI_NETBUF_LEN], user[SMALLBUF], pass[SMALLBUF];
3219+
char buf[UPSCLI_NETBUF_LEN], user[UPSCLI_NETBUF_LEN - 12], pass[UPSCLI_NETBUF_LEN - 12];
32203220
const char *user_ptr = username;
32213221
const char *pass_ptr = password;
32223222
size_t len;

0 commit comments

Comments
 (0)