<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - shared: strv can't have more than 4294967295 elements"
href="https://bugs.freedesktop.org/show_bug.cgi?id=76745">76745</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>shared: strv can't have more than 4294967295 elements
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mustrumr97@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>Even on computers with enough RAM. The following patch may not be complete but
you should get the idea.
--- a/src/shared/strv.h
+++ b/src/shared/strv.h
@@ -34,7 +34,7 @@
#define _cleanup_strv_free_ _cleanup_(strv_freep)
char **strv_copy(char * const *l);
-unsigned strv_length(char * const *l) _pure_;
+size_t strv_length(char * const *l) _pure_;
int strv_extend_strv(char ***a, char **b);
int strv_extend_strv_concat(char ***a, char **b, const char *suffix);
@@ -96,7 +96,7 @@
if (!first) \
_l = (char**) &first; \
else { \
- unsigned _n; \
+ size_t _n; \
va_list _ap; \
\
_n = 1; \
--- a/src/shared/strv.c
+++ b/src/shared/strv.c
@@ -84,8 +84,8 @@
return r;
}
-unsigned strv_length(char * const *l) {
- unsigned n = 0;
+size_t strv_length(char * const *l) {
+ size_t n = 0;
if (!l)
return 0;
@@ -99,7 +99,7 @@
char **strv_new_ap(const char *x, va_list ap) {
const char *s;
char **a;
- unsigned n = 0, i = 0;
+ size_t n = 0, i = 0;
va_list aq;
/* As a special trick we ignore all listed strings that equal
@@ -204,7 +204,7 @@
char *state;
char *w;
size_t l;
- unsigned n, i;
+ size_t n, i;
char **r;
assert(s);
@@ -236,7 +236,7 @@
char *state;
char *w;
size_t l;
- unsigned n, i;
+ size_t n, i;
char **r;
assert(s);
@@ -265,7 +265,7 @@
char **strv_split_newlines(const char *s) {
char **l;
- unsigned n;
+ size_t n;
assert(s);
@@ -361,7 +361,7 @@
int strv_push(char ***l, char *value) {
char **c;
- unsigned n;
+ size_t n;
if (!value)
return 0;
@@ -436,7 +436,7 @@
char **strv_parse_nulstr(const char *s, size_t l) {
const char *p;
- unsigned c = 0, i = 0;
+ size_t c = 0, i = 0;
char **v;
assert(s || l <= 0);</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>