From 42f26661aef4474a07544cf24187e00f204d1023 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 28 Jun 2018 02:15:02 +0000 Subject: Release 10.82.03 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3282 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pbmmask.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'editor') diff --git a/editor/pbmmask.c b/editor/pbmmask.c index 21ada6b9..25c71226 100644 --- a/editor/pbmmask.c +++ b/editor/pbmmask.c @@ -143,6 +143,11 @@ main(int argc, char * argv[]) { pm_usage( usage ); bits = pbm_readpbm( ifp, &cols, &rows ); + + if (cols == 0 || rows == 0) + pm_error("Image contains no pixels, so there is no such thing " + "as background and foreground"); + pm_close( ifp ); mask = pbm_allocarray( cols, rows ); -- cgit 1.4.1