pkgsrc-Bugs archive

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

pkg/43308: ctwm of X11 window manager dumps core on 64bit CPU environment when using JPEG file for background image



>Number:         43308
>Category:       pkg
>Synopsis:       ctwm of X11 window manager dumps core on 64bit CPU environment 
>when using JPEG file for background image
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 14 23:30:00 +0000 2010
>Originator:     Motoyuki OHMORI
>Release:        NetBSD current 5.99.22 (2010/04/26)
>Organization:
Chikushi Jogakuen University
>Environment:
NetBSD silvia.chikushi-u.ac.jp 5.99.22 NetBSD 5.99.22 (SILVIA) #4: Tue Jan 12 17
:31:05 JST 2010  
ohmori%silvia.chikushi-u.ac.jp@localhost:/usr/src/sys/arch/i386/compile/S
ILVIA i386
>Description:
On 64 bit CPU environment (e.g. amd64), ctwm of X11 window manager 
(pkgsrc/wm/ctwm) dumps core when JPEG file is used for back ground image.

Ctwm seems not to consider 64 bit environment and to assume that long is 4-byte 
length.  Therefore, ctwm might dump core.
>How-To-Repeat:
On amd64, configure .ctwmrc to have some JPEG image file for background.
Then, ctwm results in core dump.
>Fix:
Bellow patche fixes the problem:

*** util.c.orig Fri Feb 16 18:24:27 2007
--- util.c      Fri May 14 14:38:46 2010
***************
*** 3942,3948 ****
  #ifdef JPEG

  unsigned short int *buffer_16bpp;
! long *buffer_32bpp;

  static void convert_for_16 (int w, int x, int y, int r, int g, int b) {
    buffer_16bpp [y * w + x] = ((r >> 3) << 11) + ((g >> 2) << 5) + (b >> 3);
--- 3942,3948 ----
  #ifdef JPEG

  unsigned short int *buffer_16bpp;
! int32_t *buffer_32bpp;

  static void convert_for_16 (int w, int x, int y, int r, int g, int b) {
    buffer_16bpp [y * w + x] = ((r >> 3) << 11) + ((g >> 2) << 5) + (b >> 3);



Home | Main Index | Thread Index | Old Index