Commit Graph

273 Commits

Author SHA1 Message Date
Lev Walkin 4087683d67 Merge pull request #158 from johvik/duplicate_const
Fix duplicate 'const' warnings
2017-06-27 08:28:49 -07:00
Lev Walkin f4cbbe70e8 safety fix 2017-06-27 08:19:11 -07:00
johvik e70c40724c Fix duplicate 'const' warnings
Since the typedef of asn_INTEGER_specifics_t also contains a const the
compiler complained about:
"warning: duplicate ‘const’ [-Wpedantic]"
2017-05-09 11:06:12 +02:00
johvik bd3dea9b7b Add (void) when st is unused
This is to get rid of the GCC warning:
"warning: unused variable ‘st’ [-Wunused-variable]"
2017-05-09 10:20:51 +02:00
Bi-Ruei, Chiu 80fd3065f4 Merge PR99 and its fixes to support parsing Information Object and Information Object Set
This is a collection of works :

1. Based on @zhanglei002's pull request 99.

2. A fix by @AuthenticEshkinKot and merged by @mouse07410 at
   commit 2c8d366bbe1fc4e4c041e9b0eb9779f8a42d754b of https://github.com/mouse07410/asn1c
   to support parsing of Information Object and Information Object Set

3. A fix by @Uri Blumenthal in asn1fix_derefv.c at :
   commit ec0ade4f87c807e763e3f35fc5466adb6dda3473 of https://github.com/mouse07410/asn1c
   to solve crash on asn1p_value_free().

4. My pull request 18 to @mouse07410's https://github.com/mouse07410/asn1c to solve
   problems found during parsing ASN.1 modules of S1AP, RANAP and J2735-201603.

5. My pull request 22 to @mouse07410's https://github.com/mouse07410/asn1c to solve issue 147
   and to solve the problem during parsing ASN.1 module of NBAP.

6. My pull request 23 to @mouse07410's https://github.com/mouse07410/asn1c to fix memory leakage
   introduced in aforementioned commits.
   Most code changes are the same as pull request 153 to this repository.

7. A fix of my bug in item 6 which result asn1c crash, fixed by @mouse07410.
2017-05-07 22:20:30 +08:00
Lev Walkin 4021e4ba62 Merge pull request #145 from johvik/master
Skip last comma when there are no extensions
2017-05-07 00:05:40 -07:00
Bi-Ruei, Chiu 3dcf05bbb0 Fix some memory leakage found 2017-05-05 15:03:32 +08:00
johvik 792216e97f Skip last comma when there are no extensions
This is to get rid of the GCC warning:
"warning: comma at end of enumerator list [-Wpedantic]"
2017-04-11 10:42:21 +02:00
Lev Walkin fbbe4edc8e Merge pull request #126 from brchiu/fix_some_leak_reported_by_valgrind
Fix many memory leaks reported by valgrind
2017-03-26 05:55:00 -07:00
Lev Walkin e0a303922e Merge pull request #118 from gareins/master
Refreshing reserved keywords
2017-03-26 05:08:58 -07:00
Lev Walkin 47c8e47506 Merge pull request #104 from velichkov/asn1c_make_identifier_segfault
Fix segmentation fault in asn1c_make_identifier
2017-03-26 04:12:27 -07:00
Bi-Ruei, Chiu 9b87e5b095 Fix 'declaration inside parameter list' warning
1. Add forward definition section.
2. Move type definition inside A_SEQUENCE_OF() to forward definition section.
3. Modify asn1c_lang_C_type_CHOICE() ...etc functions to achieve it.
4. Modify test cases used during 'make check'.
2017-03-15 16:18:46 +08:00
Bi-Ruei, Chiu 6f34894ca3 Free memory allocated in asn1c_read_file_dependencies() and asn1c_deps_makelist() 2016-11-08 22:35:16 +08:00
Bi-Ruei, Chiu 64505efde4 Free memory pointed by r_value and r_size 2016-11-08 13:59:29 +08:00
Bi-Ruei, Chiu 9b78083824 Free memory allocated in asn1c_compiled_output() and asn1c_lang_C_type_SEx_OF_def() 2016-11-07 22:19:10 +08:00
Bi-Ruei, Chiu 12021b53b8 Free memory pointed by tag2el, tag2el_cxer and source_file_name 2016-11-04 11:59:45 +08:00
Ozbolt Menegatti 11a3d68be5 Refreshing reserved keywords 2016-10-24 15:22:57 +02:00
Vasil Velichkov febd3d5a02 Fix segmentation fault in asn1c_make_identifier
See also http://stackoverflow.com/questions/25390720/va-arg-gives-something-strange-in-cygwin-x64

  Program received signal SIGSEGV, Segmentation fault.
  (gdb) bt
  #0  0x00007ffff7b7c8f1 in __strlen_sse2_pminub () from /lib64/libc.so.6
  #1  0x0000000000425d29 in asn1c_make_identifier (flags=flags@entry=(AMI_MASK_ONLY_SPACES | AMI_NODELIMITER), expr=expr@entry=0x0) at asn1c_misc.c:73
  #2  0x00000000004263ec in asn1c_type_name (arg=arg@entry=0x7fffffffe000, expr=expr@entry=0x6757c0, _format=<optimized out>,
      _format@entry=TNF_INCLUDE) at asn1c_misc.c:268
  #3  0x00000000004226fc in asn1c_lang_C_type_SIMPLE_TYPE (arg=arg@entry=0x7fffffffe000) at asn1c_C.c:1119
  #4  0x00000000004232c1 in asn1c_lang_C_type_common_INTEGER (arg=0x7fffffffe000) at asn1c_C.c:251
  #5  0x0000000000419c75 in asn1c_compile_expr (arg=arg@entry=0x7fffffffe000) at asn1compiler.c:100
  #6  0x0000000000419f33 in asn1_compile (asn=asn@entry=0x671e10, datadir=datadir@entry=0x426730 "/home/vasko/usr/share/asn1c",
      flags=flags@entry=A1C_NO_C99, argc=2, optc=0, argv=0x7fffffffe268) at asn1compiler.c:44
  #7  0x0000000000401f13 in main (ac=1, av=0x7fffffffe270) at asn1c.c:328
2016-07-18 20:24:49 +03:00
Lev Walkin 7c1dc05f0e do not use reserved identifiers, contd 2016-03-14 03:08:19 -07:00
Lev Walkin c6cac8e958 do not use reserved identifiers 2016-03-14 02:57:34 -07:00
Lev Walkin f2b2f37660 error values check from printf, fprintf, fwrite 2016-03-14 02:23:48 -07:00
Lev Walkin 4cc4599a7c more diagnostics if memory fails 2016-03-14 02:08:12 -07:00
Lev Walkin d8b8364c8a removed unneeded check before free() 2016-03-14 02:00:27 -07:00
Lev Walkin d62d7d51b0 ftruncate output should not be ignored under some compilers 2016-01-23 08:04:46 -08:00
Lev Walkin 0f2624523b bit strings also can haz members 2016-01-10 13:33:08 -08:00
Lev Walkin 1b3a135184 fix compiler warnings 2016-01-10 13:15:02 -08:00
Lev Walkin da94cd4287 useless -all-static 2014-10-13 02:43:57 +00:00
Lev Walkin ebfc44d02a issue/32 fchmod() does not respect umask 2014-10-12 19:30:12 -07:00
Lev Walkin 3278995748 merged patch #31 2014-10-12 18:51:52 -07:00
Lev Walkin 78d604fe9e Merge pull request #46 from wiml/constify
Move as much data as possible into non-writable text by declaring it const
2014-10-12 18:30:33 -07:00
Lev Walkin 1b03c79368 removed autotools intermediate files from source code; use autoreconf -iv. 2014-10-12 17:31:26 -07:00
Lev Walkin e0d321a650 version 0.9.26 2014-09-11 01:28:57 -07:00
Wim Lewis fb6344ef75 Declare most internal, constant tables as const, particularly the
"specifics" structures and the tables they point to.
2014-07-28 12:16:01 -07:00
Wim Lewis a73ae673f0 Declare the permitted alphabet tables and code2value tables const. 2014-07-22 19:55:30 -07:00
Lev Walkin 334d5cc7fb change type width detection logic 2014-02-10 11:06:56 -08:00
Lev Walkin e5086e3f92 extensibility shall not change the type from wide to narrow 2014-02-10 11:00:51 -08:00
Lev Walkin ea55215e3c split ADD_CFLAGS and TESTSUITE_CFLAGS 2014-01-14 02:15:13 -08:00
Lev Walkin f84cc014d4 check cc flags viability before setting them 2014-01-14 02:12:24 -08:00
Lev Walkin 5b63acf7aa remove errors with ./configure --enable-Werror 2014-01-14 01:48:37 -08:00
Lev Walkin aef10c36f7 upgrade autotools 2014-01-14 01:47:25 -08:00
Lev Walkin 6169b8d565 fix default constraint checking 2013-12-07 11:02:44 -08:00
Lev Walkin 4062b01cd5 add -fline-refs 2013-10-11 14:29:38 -07:00
Frank Morgner 8a759ad3db try to link symlink and use a define on error
fixes compiling with Minimalist GNU win32 (cross) compiler 4.2.1, which
defines symlink, but doesn't implement it.
2013-05-16 15:02:59 +02:00
Lev Walkin 1715b32c87 format and signedness mismatch fixes 2013-03-28 04:02:13 -07:00
Lev Walkin 2a744a7470 Behavior of -fnative-types made default; old behavior saved under -fwide-types 2013-03-27 01:56:23 -07:00
Lev Walkin 2655eb3f05 deprecate -fskeletons-copy; this option is now a default; use -flink-skeletons for old behavior 2013-03-25 19:09:04 -07:00
Lev Walkin 30ae27b6b1 C++ keywords added to a no-no list 2013-03-19 17:15:28 -07:00
Lev Walkin 50d52cf5fd windows compatibility; suggested by github.com/sapien2 2013-03-16 08:00:57 -07:00
Lev Walkin b3751947cb upgrade autotools 2012-09-02 19:36:47 -07:00
Santiago Carot-Nemesio 8da8e73f18 Fix compilation warning in generated check constraints function.
Integer types defined in ASN1 in the range (0..4294967295) does
not need declare the variable "value". Before this patch, generated
code produced an unnecessary variable assignation and new compilers
trigger a message warning because the variable is no longer used
anymore due to the optimization for unsigned longs check.
2011-04-22 14:00:08 +02:00
Lev Walkin 936595643a WIN32 -> _WIN32; see http://predef.sourceforge.net/preos.html#sec25 2010-11-20 09:47:13 -08:00
Lev Walkin e7c4b96655 update automake and move doc -> docsrc 2010-11-09 03:26:07 -08:00
Lev Walkin 4c776e5921 aclocal-1.10 2010-11-08 02:14:14 -08:00
Lev Walkin 4da95cf66c newer version of build tools 2010-10-16 03:18:57 -07:00
Lev Walkin ffd035e9e0 react to -fincludes-quoted 2010-10-16 01:26:57 -07:00
Lev Walkin 34944f2afb Added -fincludes-quoted to generate #includes in double instead of <angle> quotes. 2010-10-07 08:25:37 +00:00
Lev Walkin 8bb57a29c1 unsigned integer of 32-bit widtth support for per 2007-12-03 13:41:36 +00:00
Lev Walkin e751cd8b93 Windows patch by Cyril Pertsev 2007-11-13 22:30:09 +00:00
Lev Walkin 63b4126c09 C90-compliant negative LONG_MIN 2007-11-06 01:48:46 +00:00
Lev Walkin 27fd0b6a46 upgraded compatibility 2007-08-27 23:57:45 +00:00
Lev Walkin 08afe612de regeneration 2007-07-23 06:49:56 +00:00
Lev Walkin 8032f7ab44 optionality handling 2007-06-27 01:54:57 +00:00
Lev Walkin 06bf7ccb9f reautomakified 2007-06-24 09:13:16 +00:00
Lev Walkin 33af5c3ef1 extensibility fix 2007-06-23 20:05:49 +00:00
Lev Walkin c5a5d22cd5 some fixes 2007-06-23 17:35:56 +00:00
Lev Walkin 3a4689a7da BMPString and UniversalString support 2006-11-24 11:20:27 +00:00
Lev Walkin 9ab21b8984 Fixed explicit tagging of an in-lined constructed type. 2006-10-19 02:46:01 +00:00
Lev Walkin 07aaa34e7d choice constraint generation duplication dropped 2006-10-09 12:52:15 +00:00
Lev Walkin 4b5dae3d64 diffs 2006-10-09 12:27:44 +00:00
Lev Walkin 725883b28d more PER support 2006-10-09 12:07:58 +00:00
Lev Walkin 66adab4823 -pdu=* changes 2006-09-23 02:52:12 +00:00
Lev Walkin 729eb86bb0 generate PER code tables for known-multiplier strings 2006-09-21 01:50:13 +00:00
Lev Walkin 8c2ca0b088 XER reference types encoding error 2006-09-17 06:31:08 +00:00
Lev Walkin a9532f4d2b moved -DASN_PDU_COLLECTION into compiler 2006-09-17 04:52:50 +00:00
Lev Walkin 22b5ed4142 *** empty log message *** 2006-09-13 02:51:20 +00:00
Lev Walkin 0e89d101b3 proper dependency tracking (regression fixed) 2006-09-12 06:37:17 +00:00
Lev Walkin f218e78596 CONVERTER is now in dependencies 2006-09-12 06:21:18 +00:00
Lev Walkin d83172f7d3 MEGACO (Media Gateway Control) protocol decoder 2006-09-09 04:49:45 +00:00
Lev Walkin dcf1e35b8c unused bits 2006-09-08 19:34:22 +00:00
Lev Walkin 0f8d4a4145 tolerate bit string extensibility 2006-08-26 03:29:15 +00:00
Lev Walkin c46b7cb500 *** empty log message *** 2006-08-18 02:27:55 +00:00
Lev Walkin 5af1a6993b automake-1.9 2006-08-18 01:54:27 +00:00
Lev Walkin b1db925b55 *** empty log message *** 2006-08-18 01:51:50 +00:00
Lev Walkin 11380fba0c *** empty log message *** 2006-08-18 01:38:40 +00:00
Lev Walkin 1dc8529923 *** empty log message *** 2006-08-18 01:32:26 +00:00
Lev Walkin 1eded3544e *** empty log message *** 2006-07-13 11:19:01 +00:00
Lev Walkin 171487e6ed some more parameterization 2006-03-21 07:25:18 +00:00
Lev Walkin a00d6b3714 refactored parameterization support 2006-03-21 03:40:38 +00:00
Lev Walkin 8253ea93aa command line in preamble 2006-03-17 01:47:57 +00:00
Lev Walkin c2a75094b5 class field access problem 2006-03-14 11:52:12 +00:00
Lev Walkin 9c2285abf3 parsing object classes more properly 2006-03-09 08:49:26 +00:00
Lev Walkin 0913f24d8d skip filenameless includes 2006-03-06 00:30:30 +00:00
Lev Walkin 4737039b8d includes are outside of extern C {} clause 2006-02-19 04:30:15 +00:00
Lev Walkin ae5540f5ea includes are outside of extern C {} clause 2006-02-19 04:26:37 +00:00
Lev Walkin 59b176ee35 upgrade: PER related changes 2005-11-26 11:25:14 +00:00
Lev Walkin d1bfea65a0 SET OF/SEQUENCE OF interaction with named and unnamed CHOICE 2005-11-08 03:06:16 +00:00
Lev Walkin a895afba67 -fskeletons-copy 2005-10-06 10:09:34 +00:00
Lev Walkin c0e7071cd4 asn1c code for windows platform fixed, thanks to rmeub@users.sourceforge.net 2005-10-05 09:01:51 +00:00
Lev Walkin ac760bf5b9 SET mandatory map generation 2005-10-05 08:59:03 +00:00
Lev Walkin ae7bf3fbe8 YuanMeng was very helpful in finding these 2005-08-29 10:31:14 +00:00