~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to libtomcrypt/mycrypt_argchk.h

  • Committer: Bazaar Package Importer
  • Author(s): Matt Johnston
  • Date: 2005-12-08 19:20:21 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208192021-nyp9rwnt77nsg6ty
Tags: 0.47-1
* New upstream release.
* SECURITY: Fix incorrect buffer sizing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Defines the _ARGCHK macro used within the library */
2
 
/* ARGTYPE is defined in mycrypt_cfg.h */
3
 
#if ARGTYPE == 0
4
 
 
5
 
#include <signal.h>
6
 
 
7
 
/* this is the default LibTomCrypt macro  */
8
 
void crypt_argchk(char *v, char *s, int d);
9
 
#define _ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); }
10
 
 
11
 
#elif ARGTYPE == 1
12
 
 
13
 
/* fatal type of error */
14
 
#define _ARGCHK(x) assert((x))
15
 
 
16
 
#elif ARGTYPE == 2
17
 
 
18
 
#define _ARGCHK(x) 
19
 
 
20
 
#endif
21