File atftp-0.7_bug-213384_OPT_NUMBER.patch of Package atftp

---
 options.h  |    2 +-
 tftp_def.c |    2 +-
 tftp_def.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Index: options.h
===================================================================
--- options.h.orig	2001-07-07 01:35:18.000000000 +0200
+++ options.h	2007-01-22 18:27:05.238498611 +0100
@@ -27,7 +27,7 @@ struct tftp_opt {
      int enabled;               /* enabled for use by server or client */
 };
 
-extern struct tftp_opt tftp_default_options[OPT_NUMBER];
+extern struct tftp_opt tftp_default_options[OPT_NUMBER + 1];
 
 int opt_parse_request(char *data, int data_size, struct tftp_opt *options);
 int opt_parse_options(char *data, int data_size, struct tftp_opt *options);
Index: tftp_def.c
===================================================================
--- tftp_def.c.orig	2004-03-06 21:41:41.000000000 +0100
+++ tftp_def.c	2007-01-22 18:27:05.254499542 +0100
@@ -30,7 +30,7 @@
  */
 
 // FIXME: is there a way to use TIMEOUT and SEGSIZE here?
-struct tftp_opt tftp_default_options[OPT_NUMBER] = {
+struct tftp_opt tftp_default_options[OPT_NUMBER + 1] = {
      { "filename", "", 0, 1},   /* file to transfer */
      { "mode", "octet", 0, 1},  /* mode for transfer */
      { "tsize", "0", 0, 1 },    /* RFC1350 options. See RFC2347, */
Index: tftp_def.h
===================================================================
--- tftp_def.h.orig	2004-03-06 21:41:41.000000000 +0100
+++ tftp_def.h	2007-01-22 18:27:05.274500706 +0100
@@ -40,7 +40,7 @@
 #define OPT_TIMEOUT   3
 #define OPT_BLKSIZE   4
 #define OPT_MULTICAST 5
-#define OPT_NUMBER    7
+#define OPT_NUMBER    6
 
 #define OPT_SIZE     12
 #define VAL_SIZE     MAXLEN
openSUSE Build Service is sponsored by