Go into the XPM v3.4 source directory, 
and pipe this file into "patch -p"
You may want to clean the directory afterwards by a:
find . \( -name \*.orig -o -size 0 \) -exec rm {} \;

diff -c1 -r ./CHANGES /tmp/xpm-3.4a/CHANGES
*** ./CHANGES	Tue Mar 29 10:45:02 1994
--- /tmp/xpm-3.4a/CHANGES	Tue Mar 29 10:44:56 1994
***************
*** 7,8 ****
--- 7,15 ----
  
+ 3.4a	(94/03/29)
+ 
+     BUGS CORRECTED:
+ 	- passing NULL as shapemask_return to XpmReadFileToPixmap and similar
+ 	  functions was leading to a bus error.
+ 		- Dean Luick <dean@falcon.natinst.com>
+ 
  3.4	(94/03/14)
Common subdirectories: ./doc and /tmp/xpm-3.4a/doc
Common subdirectories: ./lib and /tmp/xpm-3.4a/lib
Common subdirectories: ./sxpm and /tmp/xpm-3.4a/sxpm
diff -c1 -r ./lib/XpmCrPFrBuf.c /tmp/xpm-3.4a/lib/XpmCrPFrBuf.c
*** ./lib/XpmCrPFrBuf.c	Tue Mar 29 10:45:03 1994
--- /tmp/xpm-3.4a/lib/XpmCrPFrBuf.c	Tue Mar 29 10:44:57 1994
***************
*** 32,35 ****
      /* create the images */
!     ErrorStatus = XpmCreateImageFromBuffer(display, buffer, &ximage,
! 					   &shapeimage, attributes);
  
--- 32,38 ----
      /* create the images */
!     ErrorStatus = XpmCreateImageFromBuffer(display, buffer,
! 					   (pixmap_return ? &ximage : NULL),
! 					   (shapemask_return ?
! 					    &shapeimage : NULL),
! 					   attributes);
  
***************
*** 39,41 ****
      /* create the pixmaps and destroy images */
!      if (ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
--- 42,44 ----
      /* create the pixmaps and destroy images */
!      if (pixmap_return && ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
***************
*** 43,45 ****
      }
!     if (shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
--- 46,48 ----
      }
!     if (shapemask_return && shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
diff -c1 -r ./lib/XpmCrPFrData.c /tmp/xpm-3.4a/lib/XpmCrPFrData.c
*** ./lib/XpmCrPFrData.c	Tue Mar 29 10:45:03 1994
--- /tmp/xpm-3.4a/lib/XpmCrPFrData.c	Tue Mar 29 10:44:57 1994
***************
*** 32,34 ****
      /* create the images */
!     ErrorStatus = XpmCreateImageFromData(display, data, &ximage, &shapeimage,
  					 attributes);
--- 32,37 ----
      /* create the images */
!     ErrorStatus = XpmCreateImageFromData(display, data,
! 					 (pixmap_return ? &ximage : NULL),
! 					 (shapemask_return ?
! 					  &shapeimage : NULL),
  					 attributes);
***************
*** 42,44 ****
      /* create the pixmaps and destroy images */
!      if (ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
--- 45,47 ----
      /* create the pixmaps and destroy images */
!      if (pixmap_return && ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
***************
*** 46,48 ****
      }
!     if (shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
--- 49,51 ----
      }
!     if (shapemask_return && shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
diff -c1 -r ./lib/XpmRdFToP.c /tmp/xpm-3.4a/lib/XpmRdFToP.c
*** ./lib/XpmRdFToP.c	Tue Mar 29 10:45:03 1994
--- /tmp/xpm-3.4a/lib/XpmRdFToP.c	Tue Mar 29 10:44:57 1994
***************
*** 32,34 ****
      /* create the images */
!     ErrorStatus = XpmReadFileToImage(display, filename, &ximage, &shapeimage,
  				     attributes);
--- 32,36 ----
      /* create the images */
!     ErrorStatus = XpmReadFileToImage(display, filename,
! 				     (pixmap_return ? &ximage : NULL),
! 				     (shapemask_return ? &shapeimage : NULL),
  				     attributes);
***************
*** 39,41 ****
      /* create the pixmaps and destroy images */
!      if (ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
--- 41,43 ----
      /* create the pixmaps and destroy images */
!      if (pixmap_return && ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
***************
*** 43,45 ****
      }
!     if (shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
--- 45,47 ----
      }
!     if (shapemask_return && shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
diff -c1 -r ./lib/create.c /tmp/xpm-3.4a/lib/create.c
*** ./lib/create.c	Tue Mar 29 10:45:04 1994
--- /tmp/xpm-3.4a/lib/create.c	Tue Mar 29 10:44:58 1994
***************
*** 1401,1403 ****
      ErrorStatus = XpmCreateImageFromXpmImage(display, image,
! 					     &ximage, &shapeimage,
  					     attributes);
--- 1401,1405 ----
      ErrorStatus = XpmCreateImageFromXpmImage(display, image,
! 					     (pixmap_return ? &ximage : NULL),
! 					     (shapemask_return ? 
! 					      &shapeimage : NULL),
  					     attributes);
***************
*** 1407,1409 ****
      /* create the pixmaps and destroy images */
!     if (ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
--- 1409,1411 ----
      /* create the pixmaps and destroy images */
!     if (pixmap_return && ximage) {
  	xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
***************
*** 1411,1413 ****
      }
!     if (shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
--- 1413,1415 ----
      }
!     if (shapemask_return && shapeimage) {
  	xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return);
diff -c1 -r ./lib/data.c /tmp/xpm-3.4a/lib/data.c
*** ./lib/data.c	Tue Mar 29 10:45:04 1994
--- /tmp/xpm-3.4a/lib/data.c	Tue Mar 29 10:44:58 1994
***************
*** 11,13 ****
  /* Official version number */
! static char *RCS_Version = "$XpmVersion: 3.4 $";
  
--- 11,13 ----
  /* Official version number */
! static char *RCS_Version = "$XpmVersion: 3.4a $";
  
***************
*** 14,16 ****
  /* Internal version number */
! static char *RCS_Id = "$Id: xpm.shar,v 3.24 1994/03/21 14:47:32 lehors Exp $";
  
--- 14,16 ----
  /* Internal version number */
! static char *RCS_Id = "$Id: xpm.shar,v 3.25 1994/03/29 08:43:01 lehors Exp $";
  
diff -c1 -r ./lib/xpm.h /tmp/xpm-3.4a/lib/xpm.h
*** ./lib/xpm.h	Tue Mar 29 10:45:05 1994
--- /tmp/xpm-3.4a/lib/xpm.h	Tue Mar 29 10:44:58 1994
***************
*** 28,32 ****
  #define XpmVersion 4
! #define XpmRevision 0
  
! #define XpmIncludeVersion 30400
  
--- 28,32 ----
  #define XpmVersion 4
! #define XpmRevision 1
  
! #define XpmIncludeVersion 30401
  
