diff options
| author | David M. Syzdek <david@syzdek.net> | 2023-01-11 10:55:17 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2023-01-11 10:55:17 -0900 |
| commit | 042825fa315a96e6e6741419514767b2c37a0d02 (patch) | |
| tree | ad18ce40cf1b7b8c335509a8a537a9c5de3d8112 /lib | |
| parent | 20e442d8985b379f287fe0af5d2652fcb96a0e3b (diff) | |
| download | otputils-042825fa315a96e6e6741419514767b2c37a0d02.tar.gz otputils-042825fa315a96e6e6741419514767b2c37a0d02.tar.bz2 otputils-042825fa315a96e6e6741419514767b2c37a0d02.tar.xz otputils-042825fa315a96e6e6741419514767b2c37a0d02.zip | |
libotputil: fixing NULL dereferencing in otputil_skey_cmp()
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libotputil/lrfc1760-skey.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libotputil/lrfc1760-skey.c b/lib/libotputil/lrfc1760-skey.c index f152cd4..62e5d5e 100644 --- a/lib/libotputil/lrfc1760-skey.c +++ b/lib/libotputil/lrfc1760-skey.c | |||
| @@ -93,6 +93,8 @@ otputil_skey_cmp( | |||
| 93 | size_t x_len = ((x)) ? strlen(x) : 0; | 93 | size_t x_len = ((x)) ? strlen(x) : 0; |
| 94 | size_t y_len = ((y)) ? strlen(y) : 0; | 94 | size_t y_len = ((y)) ? strlen(y) : 0; |
| 95 | 95 | ||
| 96 | if ( (!(x)) && (!(y)) ) | ||
| 97 | return(0); | ||
| 96 | if ( ((x)) && (!(y)) ) | 98 | if ( ((x)) && (!(y)) ) |
| 97 | return(-1); | 99 | return(-1); |
| 98 | if ( (!(x)) && ((y)) ) | 100 | if ( (!(x)) && ((y)) ) |
