diff options
Diffstat (limited to 'common/ratp/getenv.c')
-rw-r--r-- | common/ratp/getenv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/ratp/getenv.c b/common/ratp/getenv.c index fdb4b0b282..9617ab1b43 100644 --- a/common/ratp/getenv.c +++ b/common/ratp/getenv.c @@ -1,9 +1,6 @@ /* * Copyright (c) 2018 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix * - * See file CREDITS for list of people who contributed to this - * project. - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. @@ -35,6 +32,9 @@ static int ratp_cmd_getenv(const struct ratp_bb *req, int req_len, value = getenv(varname); free(varname); + if (!value) + value = ""; + dlen = strlen(value); *rsp_len = sizeof(struct ratp_bb) + dlen; |