Description: validate --width parameter input.
  Width must be greater than zero, but that wasn't enforced.
Author: Marcos Daniel Marado Torres <mindboosternoori@gmail.com>
Bug-Debian: https://bugs.debian.org/628178

Index: html2text/html2text.C
===================================================================
--- html2text.orig/html2text.C
+++ html2text/html2text.C
@@ -291,18 +291,18 @@ main(int argc, char **argv)
   for (i = 1; i < argc && argv[i][0] == '-' && argv[i][1]; i++) {
     const char *arg = argv[i];
 
-    if (!strcmp(arg, "-unparse"      )) { mode = MyParser::UNPARSE;      } else
-    if (!strcmp(arg, "-check"        )) { mode = MyParser::SYNTAX_CHECK; } else
-    if (!strcmp(arg, "-debug-scanner")) { debug_scanner = true;          } else
-    if (!strcmp(arg, "-debug-parser" )) { debug_parser = true;           } else
-    if (!strcmp(arg, "-rcfile"       )) { rcfile = argv[++i];            } else
-    if (!strcmp(arg, "-style"        )) { style = argv[++i];             } else
-    if (!strcmp(arg, "-width"        )) { width = atoi(argv[++i]);       } else
-    if (!strcmp(arg, "-o"            )) { output_file_name = argv[++i];  } else
-    if (!strcmp(arg, "-nobs"         )) { use_backspaces = false;        } else
-    if (!strcmp(arg, "-ascii"        )) { use_encoding = ASCII;          } else
-    if (!strcmp(arg, "-utf8"         )) { use_encoding = UTF8;           } else
-    if (!strcmp(arg, "-nometa"       )) { use_meta = false;              } else
+    if (!strcmp(arg, "-unparse"      )) { mode = MyParser::UNPARSE;                       } else
+    if (!strcmp(arg, "-check"        )) { mode = MyParser::SYNTAX_CHECK;                  } else
+    if (!strcmp(arg, "-debug-scanner")) { debug_scanner = true;                           } else
+    if (!strcmp(arg, "-debug-parser" )) { debug_parser = true;                            } else
+    if (!strcmp(arg, "-rcfile"       )) { rcfile = argv[++i];                             } else
+    if (!strcmp(arg, "-style"        )) { style = argv[++i];                              } else
+    if (!strcmp(arg, "-width"        )) { if (atoi(argv[++i]) > 0) width = atoi(argv[i]); } else
+    if (!strcmp(arg, "-o"            )) { output_file_name = argv[++i];                   } else
+    if (!strcmp(arg, "-nobs"         )) { use_backspaces = false;                         } else
+    if (!strcmp(arg, "-ascii"        )) { use_encoding = ASCII;                           } else
+    if (!strcmp(arg, "-utf8"         )) { use_encoding = UTF8;                            } else
+    if (!strcmp(arg, "-nometa"       )) { use_meta = false;                               } else
     {
       std::cerr
 	<< "Unrecognized command line option \""
