+4
-2
@@ -1,13 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "escape.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "utf8.h"
|
||||
|
||||
@@ -300,6 +299,9 @@ ssize_t cunescape_length_with_prefix(const char *s, size_t length, const char *p
|
||||
|
||||
/* Undoes C style string escaping, and optionally prefixes it. */
|
||||
|
||||
if (length == SIZE_MAX)
|
||||
length = strlen(s);
|
||||
|
||||
pl = strlen_ptr(prefix);
|
||||
|
||||
ans = new(char, pl+length+1);
|
||||
|
||||
Reference in New Issue
Block a user