If you want a larger object, you'll have to wait at least until the
universe expands so much.
If an implementation doesn't recognize its own limitations, its a bug,
not a feature.
Closes: <https://github.com/shadow-maint/shadow/issues/1052>
Cc: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
+#include <stdint.h>
+#include <sys/param.h>
#include <unistd.h>
#include "defines.h"
if (conf == -1 && errno != 0)
return LOGIN_NAME_MAX;
- return conf;
+ return MIN(conf, PTRDIFF_MAX);
}