Skip to content

Commit 796f6ca

Browse files
committed
Third test release 0.4.938
Fix some more format string warnings, and illegal compile-time comparison warnings. -Wtautological-constant-out-of-range-compare
1 parent 6ae20ab commit 796f6ca

File tree

8 files changed

+43
-11
lines changed

8 files changed

+43
-11
lines changed

ChangeLog

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,40 @@
11
Full history from the git log
22
-----------------------------
33

4+
2018-06-30 Reini Urban <[email protected]>
5+
6+
Third test release 0.4.938
7+
8+
2018-06-29 Reini Urban <[email protected]>
9+
10+
more format string types
11+
12+
enable glibc strcasestr
13+
probed as yes, but not declared. same as on darwin.
14+
15+
../../programs/dwggrep.c:213:7: warning: implicit declaration of function ‘strcasestr’ [-Wimplicit-function-declaration]
16+
if (strcasestr(text, pattern))
17+
18+
2018-06-29 Reini Urban <[email protected]>
19+
20+
alldwg.inc: create from builddir
21+
./logs.sh can only be run from the builddir,
22+
only there are the binaries.
23+
call make from logs.sh, not gmake. we would really need a MAKE=$(MAKE)
24+
but this is only done on regen-unknown by the maintainer.
25+
make the alldwg.inc target a maintainer rule only. test -d ../.git || false
26+
27+
2018-06-28 Reini Urban <[email protected]>
28+
29+
eed: fix max limit from 1024 to obj->size
30+
And on overlong stringsize just skip it to the end.
31+
32+
This fixes the error with hatch_color_ref.dwg from [GH #27]
33+
and several LAYER entities with attached large EED data.
34+
435
2018-06-28 Reini Urban <[email protected]>
536

6-
Second test release 0.4.999
37+
Second test release 0.4.924
738

839
2018-06-28 Reini Urban <[email protected]>
940

bindings/perl/Makefile.PL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $lddlflags .= " -lredwg";
2626

2727
WriteMakefile (
2828
NAME => 'LibreDWG',
29-
VERSION => '0.4_924',
29+
VERSION => '0.4_938',
3030
($ccopts ? (CCFLAGS => $ccopts) : ()),
3131
($ldopts ? (LDFLAGS => $ldopts) : ()),
3232
($lddlflags ? (LDDLFLAGS => $lddlflags) : ()),

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dnl You should have received a copy of the GNU General Public License
99
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
1010

1111
AC_PREREQ([2.61])
12-
AC_INIT([LibreDWG],[0.4.924],[[email protected]],,
12+
AC_INIT([LibreDWG],[0.4.938],[[email protected]],,
1313
[https://savannah.gnu.org/projects/libredwg/])
1414
AC_CONFIG_AUX_DIR([build-aux])
1515
dnl for older systems use this:

doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
DOXYFILE_ENCODING = UTF-8
88
PROJECT_NAME = "LibreDWG API"
9-
PROJECT_NUMBER = 0.4.924
9+
PROJECT_NUMBER = 0.4.938
1010
PROJECT_BRIEF = "LibreDWG API - The DWG Library"
1111
PROJECT_LOGO =
1212
OUTPUT_DIRECTORY = doc/

src/common_entity_data.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
BITCODE_BS flags = bit_read_BS(dat);
6868
LOG_HANDLE("color flags: 0x%X [BS 0]\n", (unsigned)flags);
6969
ent->color.rgb = 0L;
70-
ent->color.index = flags && 0xff; // or 0x1ff?
70+
ent->color.index = flags & 0xff; // or 0x1ff?
7171
flags = flags >> 8;
7272
ent->color.flag = flags;
7373

src/dec_macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
}
286286

287287
#define VECTOR_CHKCOUNT(name,size) \
288-
if (dat->version >= R_2004 && size > 0x10000) { \
288+
if (dat->version >= R_2004 && size > 0xff00) { \
289289
LOG_ERROR("Invalid " #name " vcount %ld", (long)size); \
290290
return DWG_ERR_VALUEOUTOFBOUNDS; } \
291291

@@ -442,7 +442,7 @@
442442
LOG_HANDLE(" -> @%lu.%u (%lu)\n", dat->byte, dat->bit, bit_position(dat)); }
443443

444444
#define REPEAT_CHKCOUNT(name,times) \
445-
if (dat->version >= R_2004 && times > 0x1000) { \
445+
if (dat->version >= R_2004 && times > 0xff00) { \
446446
LOG_ERROR("Invalid " #name " rcount %ld\n", (long)times); \
447447
return DWG_ERR_VALUEOUTOFBOUNDS; } \
448448

src/decode.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,7 @@ decompress_R2004_section(Bit_Chain *restrict dat, char *restrict decomp,
14761476
if (comp_bytes > bytes_left) // bytes left to write
14771477
{
14781478
LOG_ERROR("Invalid comp_bytes %lu > %lu bytes left",
1479-
(unsigned long)comp_bytes, bytes_left)
1479+
(unsigned long)comp_bytes, (unsigned long)bytes_left)
14801480
return DWG_ERR_VALUEOUTOFBOUNDS;
14811481
}
14821482
for (i = 0; i < comp_bytes; ++i)
@@ -1698,7 +1698,8 @@ read_R2004_section_info(Bit_Chain* dat, Dwg_Data *dwg,
16981698

16991699
if (section_number > info->num_sections + info->sections[0]->number)
17001700
{
1701-
LOG_TRACE("Strange Section Number: 0x%x\n", (unsigned long)section_number)
1701+
LOG_TRACE("Strange Section Number: 0x%lx\n",
1702+
(unsigned long)section_number)
17021703
}
17031704
else
17041705
{

src/dwg.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3401,7 +3401,7 @@ DWG_ENTITY(HATCH)
34013401
FIELD_BL (num_paths, 91);
34023402
if (FIELD_VALUE(num_paths > 10000))
34033403
{
3404-
LOG_ERROR("Invalid HATCH.num_paths %lu", _obj->num_paths);
3404+
LOG_ERROR("Invalid HATCH.num_paths " FORMAT_BL, _obj->num_paths);
34053405
return DWG_ERR_VALUEOUTOFBOUNDS;
34063406
}
34073407
REPEAT(num_paths, paths, Dwg_HATCH_Path)
@@ -3412,7 +3412,7 @@ DWG_ENTITY(HATCH)
34123412
FIELD_BL (paths[rcount1].num_segs_or_paths, 93);
34133413
if (FIELD_VALUE(paths[rcount1].num_segs_or_paths > 10000))
34143414
{
3415-
LOG_ERROR("Invalid HATCH.num_segs_or_paths %lu",
3415+
LOG_ERROR("Invalid HATCH.num_segs_or_paths " FORMAT_BL,
34163416
_obj->paths[rcount1].num_segs_or_paths);
34173417
return DWG_ERR_VALUEOUTOFBOUNDS;
34183418
}

0 commit comments

Comments
 (0)