Skip to content

Commit a3f4d7b

Browse files
committed
Suggest using -H for files > 1 Gb
1 parent 6e1023d commit a3f4d7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/minisign.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ message_load(size_t *message_len, const char *message_file, int hashed)
103103
(message_len_ = ftello(fp)) == (off_t) -1) {
104104
exit_err(message_file);
105105
}
106-
if (message_len_ > (off_t) 1L << 30) {
107-
exit_msg("Data has to be smaller than 1 Gb");
106+
if (hashed == 0 && message_len_ > (off_t) 1L << 30) {
107+
exit_msg("Data has to be smaller than 1 Gb. Or use the -H option.");
108108
}
109109
if ((uintmax_t) message_len_ > (uintmax_t) SIZE_MAX ||
110110
message_len_ < (off_t) 0) {

0 commit comments

Comments
 (0)