[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch available for a stack smash


Heyall,

The Fedora people found a stack smash in saddconf.c.  The patch is on 
the website (xscorch.org) and attached to this message...

-Jacob

-- 

"Freedom without opportunity is the devil's gift."
 -Noam Chomsky
Index: saddconf.c
===================================================================
RCS file: /fridge/cvs/xscorch/sgame/saddconf.c,v
retrieving revision 1.46
diff -u -r1.46 saddconf.c
--- saddconf.c	26 Feb 2004 06:34:54 -0000	1.46
+++ saddconf.c	26 Aug 2005 16:28:19 -0000
@@ -178,8 +178,8 @@
    Read an economy scoring info and insert it into the registry. */
 
    sc_scoring_info *info;
-   char desc[SC_INVENTORY_MAX_DESC_LEN];
-   char name[SC_INVENTORY_MAX_NAME_LEN];
+   char desc[SC_ECONOMY_MAX_DESC_LEN];
+   char name[SC_ECONOMY_MAX_NAME_LEN];
 
    assert(ec != NULL);
    assert(reader != NULL);
@@ -224,7 +224,7 @@
    reg_get_boolean(reader, item, "fixed",         &info->fixed);
 
    /* Read in the scoring description if there is one. */
-   if(!reg_get_string(reader, item, "description", desc, SC_INVENTORY_MAX_DESC_LEN) || desc[0] == '\0') {
+   if(!reg_get_string(reader, item, "description", desc, SC_ECONOMY_MAX_DESC_LEN) || desc[0] == '\0') {
       info->description = NULL;
    } else {
       info->description = (char *)malloc(strlenn(desc) + 1);
Index: seconomy.h
===================================================================
RCS file: /fridge/cvs/xscorch/sgame/seconomy.h,v
retrieving revision 1.8
diff -u -r1.8 seconomy.h
--- seconomy.h	26 Feb 2004 06:34:54 -0000	1.8
+++ seconomy.h	26 Aug 2005 16:28:19 -0000
@@ -44,7 +44,7 @@
 #define  SC_ECONOMY_SELL_MARKUP     0.50        /* Percent markup to sell (<1, markdown) */
 
 #define  SC_ECONOMY_MAX_NAME_LEN    30          /* Longest allowed economy name */
-
+#define  SC_ECONOMY_MAX_DESC_LEN    80          /* Longest allowed economy description */
 
 /* Data on the various types of economy scorings */
 typedef struct _sc_scoring_info {

Notices