Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2008 00:32:12 +0300 (MSK)
From:      "admin@su29.net" <melifaro@bol.megaon.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/121097: irc/psybnc does not work on amd64
Message-ID:  <200802252132.m1PLWCuX074072@bol.megaon.ru>
Resent-Message-ID: <200802252200.m1PM03t1035997@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121097
>Category:       ports
>Synopsis:       irc/psybnc does not work on amd64
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 25 22:00:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Chernikov
>Release:        FreeBSD 7.0-BETA4 amd64
>Organization:
>Environment:
System: FreeBSD bol.megaon.ru 7.0-BETA4 FreeBSD 7.0-BETA4 #0: Sun Dec 2 16:34:41 UTC 2007 root@myers.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	
>How-To-Repeat:
	
>Fix:

	

--- psy.diff begins here ---
diff -urN psybnc/src/p_blowfish.c psybnc.new/src/p_blowfish.c
--- psybnc/src/p_blowfish.c	2005-06-04 22:22:45.000000000 +0400
+++ psybnc.new/src/p_blowfish.c	2008-02-25 23:42:07.000000000 +0300
@@ -27,16 +27,21 @@
 static char rcsid[] = "@(#)$Id: p_blowfish.c,v 1.3 2005/06/04 18:00:14 hisi Exp $";
 #endif
 
+#include <p_global.h>
+/*
 #include <stdio.h>
 #include <string.h>
 #include <config.h>
 
 char *strmncpy(char *dest, char *source, size_t len);
 char *lngtxt(int msgnum);
+*/
 
+/*
 #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
 #define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__)
 #define free(n) _pfree(n,__FILE__,__FUNCTION__,__LINE__)
+*/
 
 unsigned char *hashstring(unsigned char *str,int len);
 unsigned char *unhashstring(unsigned char *str);
@@ -478,10 +483,11 @@
    char *p, *s, *dest, *d, *pt;
    char rim[5],ep[5],rep[5];
    int i;
-   dest = (char *) pmalloc((strlen(str) + 9) * 2);
+   dest = __pmalloc((strlen(str) + 9) * 2, "p_blowfish.c", "BLOWencrypt", 481);
+   dest = pmalloc((strlen(str) + 9) * 2);
    *dest=0;
    /* pad fake string with 8 bytes to make sure there's enough */
-   s = (char *) pmalloc(strlen(str) + 9);
+   s =  pmalloc(strlen(str) + 9);
    strcpy(s, str);
    p = s;
    while (*p)
diff -urN psybnc/src/p_global.h psybnc.new/src/p_global.h
--- psybnc/src/p_global.h	2005-06-04 22:22:45.000000000 +0400
+++ psybnc.new/src/p_global.h	2008-02-25 23:36:21.000000000 +0300
@@ -972,7 +972,7 @@
 #endif
 
 #ifndef P_MEMORY
-unsigned long *__pmalloc(unsigned long size,char *module,char *function,int line);
+char *__pmalloc(unsigned long size,char *module,char *function,int line);
 void _pfree(void * pointer,char *module, char *function, int line);
 struct usert *user(int usern);
 struct newpeert *newpeer(int usern);
@@ -1267,8 +1267,8 @@
 
 #endif
 
-#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt)); strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
-#define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__)
+#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt)); strmncpy(cfunc,(char*)__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
+#define pmalloc(n) __pmalloc((n),__FILE__,(char*)__FUNCTION__,(int)__LINE__)
 
 #define SSLCERT "key/psybnc.cert.pem"
 #define SSLKEY "key/psybnc.key.pem"
diff -urN psybnc/src/p_idea.c psybnc.new/src/p_idea.c
--- psybnc/src/p_idea.c	2005-06-04 22:22:45.000000000 +0400
+++ psybnc.new/src/p_idea.c	2008-02-25 23:44:12.000000000 +0300
@@ -50,6 +50,9 @@
  * string encryption by psychoid
  */
 
+
+#include <p_global.h>
+/*
 #include <time.h>
 #include <string.h>
 #include <stdlib.h>
@@ -62,7 +65,7 @@
 
 #define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; }
 #define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__)
-
+*/
 #ifdef CRYPT
 
 #define IDEAROUNDS 8
diff -urN psybnc/src/p_memory.c psybnc.new/src/p_memory.c
--- psybnc/src/p_memory.c	2005-06-04 22:22:45.000000000 +0400
+++ psybnc.new/src/p_memory.c	2008-02-25 23:31:29.000000000 +0300
@@ -32,10 +32,10 @@
 
 /* malloc-wrapper. No memory will log an error entry and kill the bouncer */
 
-unsigned long *__pmalloc(unsigned long size,char *module,char *function, int line)
+char *__pmalloc(unsigned long size,char *module,char *function, int line)
 {
-    unsigned long *rc;
-    if (!(rc=(unsigned long *)malloc(size)))
+    char *rc;
+    if (!(rc=(char *)malloc(size)))
     {
 	p_log(LOG_ERROR,-1,lngtxt(602),module,function,line);
 	exit(0x0);
@@ -53,7 +53,7 @@
     return rc;
 }
 
-void _pfree(unsigned long *pointer, char *module, char *function, int line)
+void _pfree(char *pointer, char *module, char *function, int line)
 {
 #ifdef LOGALLOC
     if(logm==NULL)
@@ -67,7 +67,7 @@
     free(pointer);
 }
 
-#define free(a) _pfree((void *)a,__FILE__,__FUNCTION__,__LINE__)
+#define free(a) _pfree((void *)a,__FILE__,(char*)__FUNCTION__,__LINE__)
 
 /* struct wrappers. Those alloc, delete and return the needed structures */
 
--- psy.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802252132.m1PLWCuX074072>