Bug 118996 - japanese/skkserv crashes always
Summary: japanese/skkserv crashes always
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-24 15:50 UTC by KOIE Hidetaka
Modified: 2008-01-01 19:10 UTC (History)
0 users

See Also:


Attachments
file.diff (335 bytes, patch)
2007-12-24 15:50 UTC, KOIE Hidetaka
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description KOIE Hidetaka 2007-12-24 15:50:03 UTC
skkserv causes SEGV in initializing on amd64.

Fix: Need prototypes in the environment sizeof (int) != sizeof (pointer).

#include       <stdio.h>
+#include       <stdlib.h>
+#include       <string.h>

 #include       <sys/types.h>
 #ifdef HAVE_SYS_IOCTL_H
@@ -44,6 +46,7 @@
 #endif
 #include       <sys/socket.h>
 #include       <netinet/in.h>
+#include       <arpa/inet.h>
 #include       <netdb.h>
 #include       <signal.h>
 #include       <errno.h>



The following patch is to suppress a warning.



if (FD_ISSET(initsock, &readfds)) {
       len = sizeof(from);
-      if ((clientsock[nclients ++] = accept(initsock, &from, &len)) < 0) {
+      if ((clientsock[nclients ++] = accept(initsock, (struct sockaddr*)&from, &len)) < 0) {
        err("accept error; something wrong happened with the socket");
       }
       if (nclients >= MAXDTAB - 3 - debug * 2) {--IwDI80Mbb5SdouGSj5m4L9TSRxDVrPbB7nFpdXpXEE7EHDzn
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -rpub japanese/skkserv/work/skk-9.6/skkserv/skkserv.h japanese/skkserv/work.koie/skk-9.6/skkserv/skkserv.h
--- japanese/skkserv/work/skk-9.6/skkserv/skkserv.h     1997-01-21 04:16:36.000000000 +0900
+++ japanese/skkserv/work.koie/skk-9.6/skkserv/skkserv.h        2007-12-21 22:39:29.671144656 +0900
@@ -37,6 +37,8 @@
 /* Necessary for SunOS 3.x and maybe other old systems */
How-To-Repeat:         koie@guriandgura% skkserv
        Segmentation fault (core dumped)
        koie@guriandgura%
Comment 1 dfilter service freebsd_committer freebsd_triage 2008-01-01 19:03:42 UTC
arved       2008-01-01 19:03:36 UTC

  FreeBSD ports repository

  Modified files:
    japanese/skkserv     Makefile 
  Added files:
    japanese/skkserv/files patch-skkserv.c patch-skkserv.h 
  Log:
  Fix segfault on amd64
  
  PR:             118996
  Submitted by    KOIE Hidetaka
  
  Revision  Changes    Path
  1.18      +1 -0      ports/japanese/skkserv/Makefile
  1.1       +11 -0     ports/japanese/skkserv/files/patch-skkserv.c (new)
  1.1       +19 -0     ports/japanese/skkserv/files/patch-skkserv.h (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 2 Tilman Keskinoz freebsd_committer freebsd_triage 2008-01-01 19:03:47 UTC
State Changed
From-To: open->closed

committed, thanks