aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r--libcrystfel/src/image.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index f25f70d2..a71c0b97 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -343,6 +343,11 @@ void image_cache_header_str(struct image *image,
const char *header_name,
const char *header_val)
{
+ if ( strchr(header_val, '\n') != NULL ) {
+ ERROR("Header '%s' contains newline (not allowed!)\n");
+ return;
+ }
+
if ( image->n_cached_headers >= HEADER_CACHE_SIZE ) {
ERROR("Too many headers to copy.\n");
} else {