Package: moria
Version: 5.6-2

On the ubuntu builds of Moria with fortify, Moria is crashing on startup:

https://bugs.launchpad.net/ubuntu/+source/moria/+bug/925005

This looks to me like the hours reader has forgetten about the \n
on the line that they've read in and end up copying one too many
chars into the buffer; I have a fix that seems to get it to work,
however I don't know the game so it needs checking to see it's
not broken the hours stuff:

--- moria-5.6/source/files.c    2008-10-14 00:44:36.000000000 +0100
+++ moria-5.6.dag/source/files.c        2012-12-06 17:48:38.072272999 +0000
@@ -125,6 +125,12 @@
       while (fgets(in_line, 80, file1) != CNIL)
        if (strlen(in_line) > 3)
          {
+           /* These lines should be as in tables.c - i.e.
+               3 letter day, :, 24 chars, one per hour
+               the fgets will have read a \n which I'm
+               about to NULL */
+           in_line[3+1+24]='\0';
+
            if (!strncmp(in_line, "SUN:", 4))
              (void) strcpy(days[0], in_line);
            else if (!strncmp(in_line, "MON:", 4))

-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to