~ubuntu-branches/ubuntu/hardy/openswan/hardy-updates

« back to all changes in this revision

Viewing changes to lib/liblwres/print_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2005-01-27 16:10:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050127161011-idgybmyz3vwhpfiq
Tags: 2.3.0-2
Urgency HIGH due to security issue and problems with build-deps in sarge.
* Fix the security issue. Please see
  http://www.idefense.com/application/poi/display?id=190&
      type=vulnerabilities&flashstatus=false
  for more details. Thanks to Martin Schulze for informing me about
  this issue.
  Closes: #292458: Openswan XAUTH/PAM Buffer Overflow Vulnerability
* Added a Build-Dependency to lynx.
  Closes: #291143: openswan: FTBFS: Missing build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
 
3
 * Copyright (C) 1999-2001, 2003  Internet Software Consortium.
 
4
 *
 
5
 * Permission to use, copy, modify, and distribute this software for any
 
6
 * purpose with or without fee is hereby granted, provided that the above
 
7
 * copyright notice and this permission notice appear in all copies.
 
8
 *
 
9
 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 
10
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 
11
 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 
12
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 
13
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 
14
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
15
 * PERFORMANCE OF THIS SOFTWARE.
 
16
 */
 
17
 
 
18
/* $Id: print_p.h,v 1.1 2004/09/20 18:00:36 mcr Exp $ */
 
19
 
 
20
#ifndef LWRES_PRINT_P_H
 
21
#define LWRES_PRINT_P_H 1
 
22
 
 
23
/***
 
24
 *** Imports
 
25
 ***/
 
26
 
 
27
#include <lwres/lang.h>
 
28
#include <lwres/platform.h>
 
29
 
 
30
/*
 
31
 * This block allows lib/lwres/print.c to be cleanly compiled even if
 
32
 * the platform does not need it.  The standard Makefile will still
 
33
 * not compile print.c or archive print.o, so this is just to make test
 
34
 * compilation ("make print.o") easier.
 
35
 */
 
36
#if !defined(LWRES_PLATFORM_NEEDVSNPRINTF) && defined(LWRES__PRINT_SOURCE)
 
37
#define LWRES_PLATFORM_NEEDVSNPRINTF
 
38
#endif
 
39
 
 
40
#if !defined(LWRES_PLATFORM_NEEDSPRINTF) && defined(LWRES__PRINT_SOURCE)
 
41
#define LWRES_PLATFORM_NEEDSPRINTF
 
42
#endif
 
43
 
 
44
/***
 
45
 *** Macros.
 
46
 ***/
 
47
 
 
48
#ifdef __GNUC__
 
49
#define LWRES_FORMAT_PRINTF(fmt, args) \
 
50
        __attribute__((__format__(__printf__, fmt, args)))
 
51
#else
 
52
#define LWRES_FORMAT_PRINTF(fmt, args)
 
53
#endif
 
54
 
 
55
/***
 
56
 *** Functions
 
57
 ***/
 
58
 
 
59
#ifdef LWRES_PLATFORM_NEEDVSNPRINTF
 
60
#include <stdarg.h>
 
61
#include <stddef.h>
 
62
#endif
 
63
 
 
64
LWRES_LANG_BEGINDECLS
 
65
 
 
66
#ifdef LWRES_PLATFORM_NEEDVSNPRINTF
 
67
int
 
68
lwres__print_vsnprintf(char *str, size_t size, const char *format, va_list ap)
 
69
     LWRES_FORMAT_PRINTF(3, 0);
 
70
#define vsnprintf lwres__print_vsnprintf
 
71
 
 
72
int
 
73
lwres__print_snprintf(char *str, size_t size, const char *format, ...)
 
74
     LWRES_FORMAT_PRINTF(3, 4);
 
75
#define snprintf lwres__print_snprintf
 
76
#endif /* LWRES_PLATFORM_NEEDVSNPRINTF */
 
77
 
 
78
#ifdef LWRES_PLATFORM_NEEDSPRINTF
 
79
int
 
80
lwres__print_sprintf(char *str, const char *format, ...) LWRES_FORMAT_PRINTF(2, 3);
 
81
#define sprintf lwres__print_sprintf
 
82
#endif
 
83
 
 
84
LWRES_LANG_ENDDECLS
 
85
 
 
86
#endif /* LWRES_PRINT_P_H */