aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-17 12:07:43 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-17 12:07:51 +0400
commit9acc7b0ebd74fcf75ff7f82ba9bbb9aa090d5beb (patch)
tree6161560dfff5cceec77a8ec27a6e746faa5a3649 /src
parente61e18f0d5d7bb20eb081d0159b184a89f64eba9 (diff)
downloadslirp-9acc7b0ebd74fcf75ff7f82ba9bbb9aa090d5beb.zip
slirp-9acc7b0ebd74fcf75ff7f82ba9bbb9aa090d5beb.tar.gz
slirp-9acc7b0ebd74fcf75ff7f82ba9bbb9aa090d5beb.tar.bz2
bootp: fix g_str_has_prefix warning/critical
Fixes: commit 60535013c3e ("bootp: add support for UEFI HTTP boot") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/bootp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootp.c b/src/bootp.c
index 3ade02c..a0eb17a 100644
--- a/src/bootp.c
+++ b/src/bootp.c
@@ -351,7 +351,7 @@ static void bootp_reply(Slirp *slirp,
we assume that, if the bootfile parameter was configured as an http
URL, the user intends to perform UEFI HTTP boot, so send this option
automatically */
- if (g_str_has_prefix(slirp->bootp_filename, "http://")) {
+ if (slirp->bootp_filename && g_str_has_prefix(slirp->bootp_filename, "http://")) {
val = strlen(UEFI_HTTP_VENDOR_CLASS_ID);
if (q + val + 2 >= end) {
g_warning("DHCP packet size exceeded, "