Upgrade to 0.4.6.

Fix possible buffer overflow.
Thanks to cazz@wezl.org
This commit is contained in:
form 2001-01-19 09:02:06 +00:00
parent 18114b4a1f
commit c81354b8a9
8 changed files with 124 additions and 24 deletions

View File

@ -1,21 +1,19 @@
# $OpenBSD: Makefile,v 1.12 2000/10/22 16:59:25 espie Exp $
# $OpenBSD: Makefile,v 1.13 2001/01/19 09:02:06 form Exp $
# $FreeBSD: Makefile,v 1.6 1999/06/03 08:31:06 ache Exp $
DISTNAME= micq-0.4.5
DISTNAME= micq-${VERSION}
VERSION= 0.4.6
CATEGORIES= net
MASTER_SITES= ftp://micq.chatzone.org/pub/micq/V0.4.5/
MASTER_SITES= ftp://micq.chatzone.org/pub/micq/V${VERSION}/
EXTRACT_SUFX= .tgz
MAINTAINER= Oleg Safiullin <form@openbsd.org>
LICENSE_TYPE= NONE
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WRKDIST= ${WRKDIR}/micq-0.4.4
# Please uncoment one of the following lines to
# select micq language.

View File

@ -1,3 +1,3 @@
MD5 (micq-0.4.5.tgz) = a546b1d47d7eb5730bc8bef1ef2768c0
RMD160 (micq-0.4.5.tgz) = 8ddc1f8f31a755e14044e03d2218d4f5bde5004c
SHA1 (micq-0.4.5.tgz) = 6b43b431d46ddee466dc59eb4dd9ece61d0135fb
MD5 (micq-0.4.6.tgz) = d6b0b09eaf12e722c12ac14d115e49bf
RMD160 (micq-0.4.6.tgz) = b3ebd4658ad4997cfa685d267729ef687cec0dce
SHA1 (micq-0.4.6.tgz) = c95c1d7e575a0a893a96d777555abfd468f741b3

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-english_h,v 1.1 2001/01/19 09:02:08 form Exp $
--- english.h.orig Sat Jun 10 05:18:39 2000
+++ english.h Fri Jan 19 14:57:17 2001
@@ -282,6 +282,7 @@
/* Having 2 strings with the nickname inserted in the middle */
/* will hopefully solve any potential word order problems */
#define MESSAGE_SENT_1_STR "Message sent to "
+#define MESSAGE_SENT_1a_STR "Sending message to "
#define MESSAGE_SENT_2_STR "!\n"
/********************************************************************/

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-icq_response_c,v 1.1 2001/01/19 09:02:08 form Exp $
--- icq_response.c.orig Sat Jun 10 05:18:39 2000
+++ icq_response.c Fri Jan 19 14:28:16 2001
@@ -876,7 +876,7 @@ void Do_Msg( SOK_T sok, DWORD type, WORD
char_conv ("wc",data);
strcpy (url_data,data);
- sprintf (message,"Description: %s \n URL: %s",url_desc,url_data);
+ snprintf (message, sizeof(message), "Description: %s \n URL: %s",url_desc,url_data);
if ( UIN2nick( uin ) != NULL )
log_event( uin, LOG_MESS, "You received URL message from %s\n%s\n", UIN2nick(uin), message );
else

View File

@ -1,25 +1,22 @@
# $OpenBSD: patch-makefile,v 1.1 2000/04/03 16:01:32 form Exp $
--- Makefile.orig Mon Apr 3 22:33:39 2000
+++ Makefile Mon Apr 3 22:41:23 2000
@@ -1,14 +1,18 @@
# Anyone who knows how to make Makefiles please help out.
# I have no clue but this appears to work fairly well
# be sure to use gmake
$OpenBSD: patch-makefile,v 1.2 2001/01/19 09:02:08 form Exp $
--- Makefile.orig Fri Jun 9 17:18:38 2000
+++ Makefile Thu Jan 18 04:21:09 2001
@@ -5,9 +5,16 @@
# Most options that were here and soem that weren't have been moved to config.h
# edit that file to set up options.
#
-CC = gcc
-CFLAGS = -O4 -Wall -DUNIX -DANSI_COLOR
-CFLAGS = -O4 -Wall -DUNIX
+#CC = gcc
+CFLAGS += -DUNIX -DANSI_COLOR
CFLAGS += -DMAX_CONTACTS=255
CFLAGS += -DUSE_MREADLINE
#CFLAGS += -DCOLOR_SCHEME_A
#CFLAGS += -DCOLOR_SCHEME_B
#CFLAGS += -DCOLOR_SCHEME_M
+CFLAGS += -O4 -Wall -DUNIX
+
+.if defined(MICQ_LANG)
+CFLAGS += -D${MICQ_LANG}_LANG
+.else
CFLAGS += -DENGLISH_LANG
+.endif
+
+#CFLAGS += -DENGLISH_LANG
#CFLAGS += -DBULGARIAN_LANG
#CFLAGS += -DPOLISH_LANG
#CFLAGS += -DSPANISH_LANG

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-russian_h,v 1.1 2001/01/19 09:02:08 form Exp $
--- russian.h.orig Sat Jun 10 05:18:39 2000
+++ russian.h Fri Jan 19 14:57:17 2001
@@ -282,6 +282,7 @@ slightly corrected: sts@card.ru 19990525
/* Having 2 strings with the nickname inserted in the middle */
/* will hopefully solve any potential word order problems */
#define MESSAGE_SENT_1_STR "óÏÏÂÝÅÎÉÅ ÕÛÌÏ "
+#define MESSAGE_SENT_1a_STR "ïÔÐÒÁ×ËÁ ÓÏÏÂÝÅÎÉÑ "
#define MESSAGE_SENT_2_STR "!\n"
/********************************************************************/

View File

@ -0,0 +1,59 @@
$OpenBSD: patch-ui_c,v 1.1 2001/01/19 09:02:09 form Exp $
--- ui.c.orig Fri Jan 19 14:50:09 2001
+++ ui.c Fri Jan 19 14:56:24 2001
@@ -51,6 +51,10 @@ Changes :
#ifdef __BEOS__
#include "beos.h"
#endif
+
+#ifndef MESSAGE_SENT_1a_STR
+#define MESSAGE_SENT_1a_STR MESSAGE_SENT_1_STR
+#endif
MORE_INFO_STRUCT user;
@@ -176,7 +180,7 @@ BOOL Do_Multiline( SOK_T sok, char *buf
if ( strcmp( buf, END_MSG_STR ) == 0 )
{
icq_sendmsg( sok, multi_uin, msg, NORM_MESS );
- M_print( MESSAGE_SENT_1_STR );
+ M_print( MESSAGE_SENT_1a_STR );
Print_UIN_Name( multi_uin );
M_print( MESSAGE_SENT_2_STR );
last_uin = multi_uin;
@@ -202,7 +206,7 @@ BOOL Do_Multiline( SOK_T sok, char *buf
else
{
M_print( MESSAGE_BUFFER_FULL_STR );
- M_print( MESSAGE_SENT_1_STR );
+ M_print( MESSAGE_SENT_1a_STR );
Print_UIN_Name( multi_uin );
M_print( MESSAGE_SENT_2_STR );
icq_sendmsg( sok, multi_uin, msg, NORM_MESS );
@@ -1694,7 +1698,7 @@ static void Message_Function( SOK_T sok
if ( arg1 != NULL )
{
icq_sendmsg( sok, uin, arg1, NORM_MESS );
- M_print( MESSAGE_SENT_1_STR );
+ M_print( MESSAGE_SENT_1a_STR );
Print_UIN_Name( last_uin );
M_print( MESSAGE_SENT_2_STR );
}
@@ -1733,7 +1737,7 @@ static void Reply_Function( SOK_T sok )
if ( arg1 != NULL )
{
icq_sendmsg( sok, last_recv_uin, arg1, NORM_MESS );
- M_print( MESSAGE_SENT_1_STR );
+ M_print( MESSAGE_SENT_1a_STR );
Print_UIN_Name( last_recv_uin );
M_print( MESSAGE_SENT_2_STR );
}
@@ -1768,7 +1772,7 @@ static void Again_Function( SOK_T sok )
if ( arg1 != NULL )
{
icq_sendmsg( sok, last_uin, arg1, NORM_MESS );
- M_print( MESSAGE_SENT_1_STR );
+ M_print( MESSAGE_SENT_1a_STR );
Print_UIN_Name( last_uin );
M_print( MESSAGE_SENT_2_STR );
} else {

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-util_ui_c,v 1.1 2001/01/19 09:02:09 form Exp $
--- util_ui.c.orig Fri Jan 19 14:30:30 2001
+++ util_ui.c Fri Jan 19 14:30:37 2001
@@ -442,7 +442,7 @@ void add_tab( DWORD uin )
{
int i, j;
char *new=NULL;
- char *temp;
+ char *temp=NULL;
char *orig;
for ( i=0; i < Num_Contacts; i++ )