]> git.notmuchmail.org Git - notmuch/blobdiff - test/random-corpus.c
dump: Disallow \n in message IDs
[notmuch] / test / random-corpus.c
index f354d4b92c9f9e82d5cdccf6aa9360c3e729dc28..8b7748ef28010535104225f33350b3927df32134 100644 (file)
@@ -96,7 +96,9 @@ random_utf8_string (void *ctx, size_t char_count)
            buf = talloc_realloc (ctx, buf, gchar, buf_size);
        }
 
-       randomchar = random_unichar ();
+       do {
+           randomchar = random_unichar ();
+       } while (randomchar == '\n');
 
        written = g_unichar_to_utf8 (randomchar, buf + offset);