Here is a patch to bug 843 I just reported. I also fix a potential buffer
overflow.


Hub
Index: src/af/xap/unix/xap_UnixPSGraphics.cpp
===================================================================
RCS file: /u2/cvsroot/abi/src/af/xap/unix/xap_UnixPSGraphics.cpp,v
retrieving revision 1.41
diff -c -r1.41 xap_UnixPSGraphics.cpp
*** xap_UnixPSGraphics.cpp      2000/02/16 19:16:00     1.41
--- xap_UnixPSGraphics.cpp      2000/05/09 09:16:46
***************
*** 520,526 ****
        char buf[1024];
        sprintf(buf,"%d",pageNumber);
  
!       const char * argv[2] = { szPageLabel, buf };
        m_ps->formatComment("Page",argv,2);
  
        // TODO add other page-header comments here
--- 520,526 ----
        char buf[1024];
        sprintf(buf,"%d",pageNumber);
  
!       const char * argv[2] = { buf, buf };
        m_ps->formatComment("Page",argv,2);
  
        // TODO add other page-header comments here
***************
*** 618,624 ****
                if(!unixfont->openPFA())
                {
                        char message[1024];
!                       g_snprintf(message, 2048,
                                           "Font data file [%s] cannot be opened for 
reading!\n"
                                           "Did it disappear on us?  AbiWord can't 
print without\n"
                                           "this file; your PostScript might be 
missing this resource.",
--- 618,624 ----
                if(!unixfont->openPFA())
                {
                        char message[1024];
!                       g_snprintf(message, sizeof (message),
                                           "Font data file [%s] cannot be opened for 
reading!\n"
                                           "Did it disappear on us?  AbiWord can't 
print without\n"
                                           "this file; your PostScript might be 
missing this resource.",

Reply via email to