From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Oct 19 16:00:27 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00DC116A41F for ; Wed, 19 Oct 2005 16:00:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E766843D48 for ; Wed, 19 Oct 2005 16:00:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9JG0Pec030193 for ; Wed, 19 Oct 2005 16:00:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j9JG0Pwx030192; Wed, 19 Oct 2005 16:00:25 GMT (envelope-from gnats) Resent-Date: Wed, 19 Oct 2005 16:00:25 GMT Resent-Message-Id: <200510191600.j9JG0Pwx030192@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, vd@datamax.bg Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C15A216A41F; Wed, 19 Oct 2005 15:51:54 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 948AA43D46; Wed, 19 Oct 2005 15:51:53 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id 819E7B826; Wed, 19 Oct 2005 18:51:52 +0300 (EEST) Received: (nullmailer pid 57466 invoked by uid 1002); Wed, 19 Oct 2005 15:51:52 -0000 Message-Id: <20051019155151.GA57429@qlovarnika.bg.datamax> Date: Wed, 19 Oct 2005 18:51:52 +0300 From: Vasil Dimov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: mnag@FreeBSD.org Subject: ports/87669: [patch] devel/ossp-l2: non-portable usage of va_list objects causes segfault on amd64 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 16:00:27 -0000 >Number: 87669 >Category: ports >Synopsis: [patch] devel/ossp-l2: non-portable usage of va_list objects causes segfault on amd64 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 19 16:00:25 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Vasil Dimov >Release: FreeBSD 6.0-RC1 amd64 >Organization: DataMax >Environment: System: FreeBSD qlovarnika.bg.datamax 6.0-RC1 FreeBSD 6.0-RC1 #0: Mon Oct 17 15:16:42 EEST 2005 root@qlovarnika.bg.datamax:/usr/obj/usr/src/sys/QLOVARNIKA amd64 >Description: It seems that OSSP developers will to apply immediately the patch send in ticket 70: http://cvs.ossp.org/tktview?tn=70,6 I submit this here to prevent it from being forgotten, maybe it is reasonable to wait more for reaction from the OSSP developers. >How-To-Repeat: >Fix: --- ossp-l2_va.diff begins here --- diff -urN --exclude=CVS /usr/ports/devel/ossp-l2/Makefile ossp-l2/Makefile --- /usr/ports/devel/ossp-l2/Makefile Tue Oct 4 02:20:49 2005 +++ ossp-l2/Makefile Wed Oct 19 18:28:17 2005 @@ -7,6 +7,7 @@ PORTNAME= l2 PORTVERSION= 0.9.11 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_OSSP} MASTER_SITE_SUBDIR= lib/${PORTNAME} diff -urN --exclude=CVS /usr/ports/devel/ossp-l2/files/patch-va.diff ossp-l2/files/patch-va.diff --- /usr/ports/devel/ossp-l2/files/patch-va.diff Thu Jan 1 02:00:00 1970 +++ ossp-l2/files/patch-va.diff Wed Oct 19 18:35:32 2005 @@ -0,0 +1,496 @@ +diff -ur --exclude-from=excl l2-0.9.11.orig/l2.h.in l2-0.9.11/l2.h.in +--- l2.h.in Mon Oct 3 11:06:18 2005 ++++ l2.h.in Thu Oct 13 08:20:19 2005 +@@ -168,7 +168,7 @@ + const char *name; + l2_chtype_t type; + l2_result_t (*create) (l2_context_t *ctx, l2_channel_t *ch); +- l2_result_t (*configure)(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap); ++ l2_result_t (*configure)(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap); + l2_result_t (*open) (l2_context_t *ctx, l2_channel_t *ch); + l2_result_t (*write) (l2_context_t *ctx, l2_channel_t *ch, l2_level_t level, const char *buf, size_t bufsize); + l2_result_t (*flush) (l2_context_t *ctx, l2_channel_t *ch); +@@ -222,7 +222,7 @@ + l2_result_t l2_channel_flush (l2_channel_t *ch); + l2_result_t l2_channel_close (l2_channel_t *ch); + l2_result_t l2_channel_log (l2_channel_t *ch, l2_level_t level, const char *fmt, ...); +-l2_result_t l2_channel_vlog (l2_channel_t *ch, l2_level_t level, const char *fmt, va_list ap); ++l2_result_t l2_channel_vlog (l2_channel_t *ch, l2_level_t level, const char *fmt, va_list *ap); + l2_result_t l2_channel_link (l2_channel_t *ch, l2_link_t id, l2_channel_t *ch2, ...); + l2_result_t l2_channel_unlink (l2_channel_t *ch); + l2_result_t l2_channel_upstream (l2_channel_t *ch, l2_channel_t **chU); +@@ -232,10 +232,10 @@ + + /* channel tree specification operations */ + l2_result_t l2_spec (l2_channel_t **ch, l2_env_t *env, const char *spec, ...); +-l2_result_t l2_vspec (l2_channel_t **ch, l2_env_t *env, const char *spec, va_list ap); ++l2_result_t l2_vspec (l2_channel_t **ch, l2_env_t *env, const char *spec, va_list *ap); + + /* utility operations */ +-l2_result_t l2_util_setparams (l2_env_t *env, l2_param_t p[], const char *fmt, va_list ap); ++l2_result_t l2_util_setparams (l2_env_t *env, l2_param_t p[], const char *fmt, va_list *ap); + l2_result_t l2_util_l2s (char *string, size_t maxlen, int sep, unsigned int levelmask); + l2_result_t l2_util_s2l (const char *string, size_t maxlen, int sep, unsigned int *levelmask); + l2_result_t l2_util_fmt_string (l2_context_t *, const char, const char *, char *, size_t, size_t *, va_list *); +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_buffer.c l2-0.9.11/l2_ch_buffer.c +--- l2_ch_buffer.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_buffer.c Thu Oct 13 08:14:59 2005 +@@ -156,7 +156,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_buffer_t *cfg = (l2_ch_buffer_t *)ctx->vp; + l2_param_t pa[4]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_fd.c l2-0.9.11/l2_ch_fd.c +--- l2_ch_fd.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_fd.c Thu Oct 13 08:10:28 2005 +@@ -55,7 +55,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_fd_t *cfg; + l2_param_t pa[2]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_file.c l2-0.9.11/l2_ch_file.c +--- l2_ch_file.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_file.c Thu Oct 13 08:12:12 2005 +@@ -115,7 +115,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_file_t *cfg = (l2_ch_file_t *)ctx->vp; + l2_param_t pa[7]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_filter.c l2-0.9.11/l2_ch_filter.c +--- l2_ch_filter.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_filter.c Thu Oct 13 08:14:22 2005 +@@ -63,7 +63,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_filter_t *cfg = (l2_ch_filter_t *)ctx->vp; + l2_env_t *env; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_irc.c l2-0.9.11/l2_ch_irc.c +--- l2_ch_irc.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_irc.c Thu Oct 13 08:13:30 2005 +@@ -95,7 +95,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_irc_t *cfg = (l2_ch_irc_t *)ctx->vp; + l2_param_t pa[12]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_pipe.c l2-0.9.11/l2_ch_pipe.c +--- l2_ch_pipe.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_pipe.c Thu Oct 13 08:12:31 2005 +@@ -170,7 +170,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_pipe_t *cfg = (l2_ch_pipe_t *)ctx->vp; + l2_param_t pa[4]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_prefix.c l2-0.9.11/l2_ch_prefix.c +--- l2_ch_prefix.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_prefix.c Thu Oct 13 08:14:30 2005 +@@ -62,7 +62,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_prefix_t *cfg = (l2_ch_prefix_t *)ctx->vp; + l2_param_t pa[3]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_smtp.c l2-0.9.11/l2_ch_smtp.c +--- l2_ch_smtp.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_smtp.c Thu Oct 13 08:13:48 2005 +@@ -89,7 +89,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_smtp_t *cfg = (l2_ch_smtp_t *)ctx->vp; + l2_param_t pa[10]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_socket.c l2-0.9.11/l2_ch_socket.c +--- l2_ch_socket.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_socket.c Thu Oct 13 08:13:11 2005 +@@ -73,7 +73,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_socket_t *cfg = (l2_ch_socket_t *)ctx->vp; + l2_param_t pa[5]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ch_syslog.c l2-0.9.11/l2_ch_syslog.c +--- l2_ch_syslog.c Mon Oct 3 11:06:18 2005 ++++ l2_ch_syslog.c Thu Oct 13 08:12:54 2005 +@@ -157,7 +157,7 @@ + } + + /* configure channel */ +-static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap) ++static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list *ap) + { + l2_ch_syslog_t *cfg = (l2_ch_syslog_t *)ctx->vp; + l2_param_t pa[8]; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_channel.c l2-0.9.11/l2_channel.c +--- l2_channel.c Mon Oct 3 11:06:18 2005 ++++ l2_channel.c Thu Oct 13 08:15:46 2005 +@@ -284,7 +284,7 @@ + rv = L2_OK; + va_start(ap, fmt); + if (ch->handler.configure != NULL) +- rv = ch->handler.configure(&ch->context, ch, fmt, ap); ++ rv = ch->handler.configure(&ch->context, ch, fmt, &ap); + va_end(ap); + + return rv; +@@ -506,7 +506,7 @@ + + /* pass-through to va_list-based variant */ + va_start(ap, fmt); +- rv = l2_channel_vlog(ch, level, fmt, ap); ++ rv = l2_channel_vlog(ch, level, fmt, &ap); + va_end(ap); + + return rv; +@@ -551,7 +551,7 @@ + } + + /* log a message to channel (va_list-variant) */ +-l2_result_t l2_channel_vlog(l2_channel_t *ch, l2_level_t level, const char *fmt, va_list ap) ++l2_result_t l2_channel_vlog(l2_channel_t *ch, l2_level_t level, const char *fmt, va_list *ap) + { + int l, j; + size_t len; +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_env.c l2-0.9.11/l2_env.c +--- l2_env.c Mon Oct 3 11:06:18 2005 ++++ l2_env.c Thu Oct 13 07:52:59 2005 +@@ -159,7 +159,7 @@ + + /* remember error information */ + va_start(ap, fmt); +- l2_util_vsprintf(env->szErrorInfo, sizeof(env->szErrorInfo), fmt, ap); ++ l2_util_vsprintf(env->szErrorInfo, sizeof(env->szErrorInfo), fmt, &ap); + env->rvErrorInfo = rv; + va_end(ap); + +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_spec.c l2-0.9.11/l2_spec.c +--- l2_spec.c Mon Oct 3 11:06:18 2005 ++++ l2_spec.c Thu Oct 13 08:09:33 2005 +@@ -48,14 +48,14 @@ + + /* pass-through to va_list-based variant */ + va_start(ap, spec); +- rv = l2_vspec(ch, env, spec, ap); ++ rv = l2_vspec(ch, env, spec, &ap); + va_end(ap); + + return rv; + } + + /* build a channel tree according to a textual specification (va_list variant) */ +-l2_result_t l2_vspec(l2_channel_t **ch, l2_env_t *env, const char *spec, va_list ap) ++l2_result_t l2_vspec(l2_channel_t **ch, l2_env_t *env, const char *spec, va_list *ap) + { + l2_spec_ctx_t ctx; + void *yyscan; +@@ -146,7 +146,7 @@ + + /* remember error */ + va_start(ap, fmt); +- if ((cp = l2_util_vasprintf(fmt, ap)) != NULL) { ++ if ((cp = l2_util_vasprintf(fmt, &ap)) != NULL) { + l2_env_errorinfo(ctx->env, rv, "line %d, column %d: `%s'; %s", + line, column, cpBuf, cp); + free(cp); +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ut_format.c l2-0.9.11/l2_ut_format.c +--- l2_ut_format.c Mon Oct 3 11:06:18 2005 ++++ l2_ut_format.c Wed Oct 12 20:46:08 2005 +@@ -640,7 +640,7 @@ + l2_util_format( + l2_util_format_t *vbuff, + const char *fmt, +- va_list ap) ++ va_list *ap) + { + register char *sp; + register char *bep; +@@ -735,7 +735,7 @@ + adjust_width = TRUE; + } + else if (*fmt == '*') { +- min_width = va_arg(ap, int); ++ min_width = va_arg(*ap, int); + fmt++; + adjust_width = TRUE; + if (min_width < 0) { +@@ -760,7 +760,7 @@ + STR_TO_DEC(fmt, precision); + } + else if (*fmt == '*') { +- precision = va_arg(ap, int); ++ precision = va_arg(*ap, int); + fmt++; + if (precision < 0) + precision = 0; +@@ -809,17 +809,17 @@ + /* Unsigned Decimal Integer */ + case 'u': + if (var_type == IS_QUAD) { +- i_quad = va_arg(ap, u_quad_int); ++ i_quad = va_arg(*ap, u_quad_int); + s = conv_10_quad(i_quad, 1, &is_negative, + &num_buf[NUM_BUF_SIZE], &s_len); + } + else { + if (var_type == IS_LONG) +- i_num = (long_int)va_arg(ap, u_long_int); ++ i_num = (long_int)va_arg(*ap, u_long_int); + else if (var_type == IS_SHORT) +- i_num = (long_int)(unsigned short)va_arg(ap, unsigned int); ++ i_num = (long_int)(unsigned short)va_arg(*ap, unsigned int); + else +- i_num = (long_int)va_arg(ap, unsigned int); ++ i_num = (long_int)va_arg(*ap, unsigned int); + s = conv_10(i_num, 1, &is_negative, + &num_buf[NUM_BUF_SIZE], &s_len); + } +@@ -830,17 +830,17 @@ + case 'd': + case 'i': + if (var_type == IS_QUAD) { +- i_quad = va_arg(ap, quad_int); ++ i_quad = va_arg(*ap, quad_int); + s = conv_10_quad(i_quad, 0, &is_negative, + &num_buf[NUM_BUF_SIZE], &s_len); + } + else { + if (var_type == IS_LONG) +- i_num = (long_int)va_arg(ap, long_int); ++ i_num = (long_int)va_arg(*ap, long_int); + else if (var_type == IS_SHORT) +- i_num = (long_int)(short)va_arg(ap, int); ++ i_num = (long_int)(short)va_arg(*ap, int); + else +- i_num = (long_int)va_arg(ap, int); ++ i_num = (long_int)va_arg(*ap, int); + s = conv_10(i_num, 0, &is_negative, + &num_buf[NUM_BUF_SIZE], &s_len); + } +@@ -857,17 +857,17 @@ + /* Unsigned Octal Integer */ + case 'o': + if (var_type == IS_QUAD) { +- ui_quad = va_arg(ap, u_quad_int); ++ ui_quad = va_arg(*ap, u_quad_int); + s = conv_p2_quad(ui_quad, 3, *fmt, + &num_buf[NUM_BUF_SIZE], &s_len); + } + else { + if (var_type == IS_LONG) +- ui_num = (u_long_int) va_arg(ap, u_long_int); ++ ui_num = (u_long_int) va_arg(*ap, u_long_int); + else if (var_type == IS_SHORT) +- ui_num = (u_long_int)(unsigned short)va_arg(ap, unsigned int); ++ ui_num = (u_long_int)(unsigned short)va_arg(*ap, unsigned int); + else +- ui_num = (u_long_int)va_arg(ap, unsigned int); ++ ui_num = (u_long_int)va_arg(*ap, unsigned int); + s = conv_p2(ui_num, 3, *fmt, &num_buf[NUM_BUF_SIZE], &s_len); + } + FIX_PRECISION(adjust_precision, precision, s, s_len); +@@ -881,17 +881,17 @@ + case 'x': + case 'X': + if (var_type == IS_QUAD) { +- ui_quad = va_arg(ap, u_quad_int); ++ ui_quad = va_arg(*ap, u_quad_int); + s = conv_p2_quad(ui_quad, 4, *fmt, + &num_buf[NUM_BUF_SIZE], &s_len); + } + else { + if (var_type == IS_LONG) +- ui_num = (u_long_int)va_arg(ap, u_long_int); ++ ui_num = (u_long_int)va_arg(*ap, u_long_int); + else if (var_type == IS_SHORT) +- ui_num = (u_long_int)(unsigned short)va_arg(ap, unsigned int); ++ ui_num = (u_long_int)(unsigned short)va_arg(*ap, unsigned int); + else +- ui_num = (u_long_int)va_arg(ap, unsigned int); ++ ui_num = (u_long_int)va_arg(*ap, unsigned int); + s = conv_p2(ui_num, 4, *fmt, &num_buf[NUM_BUF_SIZE], &s_len); + } + FIX_PRECISION(adjust_precision, precision, s, s_len); +@@ -904,7 +904,7 @@ + + /* String */ + case 's': +- s = va_arg(ap, char *); ++ s = va_arg(*ap, char *); + if (s != NULL) { + s_len = strlen(s); + if (adjust_precision && precision < s_len) +@@ -921,7 +921,7 @@ + case 'f': + case 'e': + case 'E': +- fp_num = va_arg(ap, double); ++ fp_num = va_arg(*ap, double); + if (isnan(fp_num)) { + s = "NaN"; + s_len = 3; +@@ -947,7 +947,7 @@ + /* Double Floating Point (style 2) */ + case 'g': + case 'G': +- fp_num = va_arg(ap, double); ++ fp_num = va_arg(*ap, double); + if (isnan(fp_num)) { + s = "NaN"; + s_len = 3; +@@ -981,7 +981,7 @@ + + /* Single Character */ + case 'c': +- char_buf[0] = (char) (va_arg(ap, int)); ++ char_buf[0] = (char) (va_arg(*ap, int)); + s = &char_buf[0]; + s_len = 1; + pad_char = ' '; +@@ -998,13 +998,13 @@ + /* Special: Number of already written characters */ + case 'n': + if (var_type == IS_QUAD) +- *(va_arg(ap, quad_int *)) = cc; ++ *(va_arg(*ap, quad_int *)) = cc; + else if (var_type == IS_LONG) +- *(va_arg(ap, long *)) = cc; ++ *(va_arg(*ap, long *)) = cc; + else if (var_type == IS_SHORT) +- *(va_arg(ap, short *)) = cc; ++ *(va_arg(*ap, short *)) = cc; + else +- *(va_arg(ap, int *)) = cc; ++ *(va_arg(*ap, int *)) = cc; + break; + + /* +@@ -1012,10 +1012,10 @@ + */ + case 'p': + #if defined(SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG == SIZEOF_VOID_P) +- ui_quad = (u_quad_int) va_arg(ap, void *); ++ ui_quad = (u_quad_int) va_arg(*ap, void *); + s = conv_p2_quad(ui_quad, 4, 'x', &num_buf[NUM_BUF_SIZE], &s_len); + #else +- ui_num = (u_long_int) va_arg(ap, void *); ++ ui_num = (u_long_int) va_arg(*ap, void *); + s = conv_p2(ui_num, 4, 'x', &num_buf[NUM_BUF_SIZE], &s_len); + #endif + pad_char = ' '; +@@ -1043,7 +1043,7 @@ + if (vbuff->format != NULL) { + vbuff->format(vbuff, + &prefix_char, &pad_char, &s, &s_len, +- num_buf, NUM_BUF_SIZE, extinfo, *fmt, (va_list *)(void *)&ap); ++ num_buf, NUM_BUF_SIZE, extinfo, *fmt, ap); + if (s == NULL) + return -1; + } +@@ -1112,7 +1112,7 @@ + return -1; + } + +-int l2_util_vsprintf(char *s, size_t n, const char *fmt, va_list ap) ++int l2_util_vsprintf(char *s, size_t n, const char *fmt, va_list *ap) + { + l2_util_format_t handle; + char buf[STR_FORMAT_BUFLEN]; +@@ -1147,18 +1147,18 @@ + return rv; + } + +-char *l2_util_vasprintf(const char *fmt, va_list ap) ++char *l2_util_vasprintf(const char *fmt, va_list *ap) + { + va_list apbak; + char *s; + int rv; + +- va_copy(apbak, ap); ++ va_copy(apbak, *ap); + if ((rv = l2_util_vsprintf(NULL, -1, fmt, ap)) == -1) + return NULL; + if ((s = malloc(rv+1)) == NULL) + return NULL; +- va_copy(ap, apbak); ++ va_copy(*ap, apbak); + if ((rv = l2_util_vsprintf(s, rv+1, fmt, ap)) == -1) { + free(s); + return NULL; +@@ -1172,7 +1172,7 @@ + int rv; + + va_start(ap, fmt); +- rv = l2_util_vsprintf(s, n, fmt, ap); ++ rv = l2_util_vsprintf(s, n, fmt, &ap); + va_end(ap); + return rv; + } +@@ -1183,7 +1183,7 @@ + char *rv; + + va_start(ap, fmt); +- rv = l2_util_vasprintf(fmt, ap); ++ rv = l2_util_vasprintf(fmt, &ap); + va_end(ap); + return rv; + } +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ut_format.h l2-0.9.11/l2_ut_format.h +--- l2_ut_format.h Mon Oct 3 11:06:18 2005 ++++ l2_ut_format.h Wed Oct 12 20:45:22 2005 +@@ -66,9 +66,9 @@ + + typedef struct l2_util_format_st l2_util_format_t; + +-int l2_util_format (l2_util_format_t *vbuff, const char *fmt, va_list ap); +-int l2_util_vsprintf (char *s, size_t n, const char *fmt, va_list ap); +-char *l2_util_vasprintf (const char *fmt, va_list ap); ++int l2_util_format (l2_util_format_t *vbuff, const char *fmt, va_list *ap); ++int l2_util_vsprintf (char *s, size_t n, const char *fmt, va_list *ap); ++char *l2_util_vasprintf (const char *fmt, va_list *ap); + int l2_util_sprintf (char *s, size_t n, const char *fmt, ...); + char *l2_util_asprintf (const char *fmt, ...); + +diff -ur --exclude-from=excl l2-0.9.11.orig/l2_ut_param.c l2-0.9.11/l2_ut_param.c +--- l2_ut_param.c Mon Oct 3 11:06:18 2005 ++++ l2_ut_param.c Thu Oct 13 08:06:33 2005 +@@ -37,7 +37,7 @@ + #include + #include + +-l2_result_t l2_util_setparams(l2_env_t *env, l2_param_t pa[], const char *fmt, va_list ap) ++l2_result_t l2_util_setparams(l2_env_t *env, l2_param_t pa[], const char *fmt, va_list *ap) + { + char *cpB, *cpE; + char *spec; --- ossp-l2_va.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: