aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-06-10 08:51:47 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-06-10 17:49:50 +0300
commite0fd662ce71025cd98193e6c3229dbdff22aeccc (patch)
tree1ba65ce42190506d09dc86b2c5b6ac59ba00e02a
parent17d03a4deb7ed18abb4e0e590e6315050d9c29fd (diff)
downloadegawk-e0fd662ce71025cd98193e6c3229dbdff22aeccc.tar.gz
egawk-e0fd662ce71025cd98193e6c3229dbdff22aeccc.tar.bz2
egawk-e0fd662ce71025cd98193e6c3229dbdff22aeccc.zip
Add ChangeLog entries and some more minor fixes.
-rw-r--r--ChangeLog12
-rw-r--r--debug.c12
-rw-r--r--extension/ChangeLog21
-rw-r--r--missing_d/ChangeLog6
-rw-r--r--missing_d/fnmatch.c7
-rw-r--r--test/ChangeLog6
6 files changed, 56 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 35fc3ccc..322c7aec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,18 @@
2020-06-10 Arnold D. Robbins <arnold@skeeve.com>
+ Miscellanious fixes from Michael Builov <mbuilov@gmail.com>.
+
+ * awkgram.y (rule_block): Fix size declaration
+ (parse_program): Adjust memset call.
+ (get_comment): Check for end of file before checking for space.
+ * io.c (gawk_popen): Move os_close_on_exec call inside #endif.
+ * builtin.c (do_bindtextdomain): Don't pass NULL to strlen.
+ * debug.c (set_breakpoint): Don't dereference NULL pointer in D_func.
+ (serialize_list): Get the buffer management right to avoid overrun.
+
+2020-06-10 Arnold D. Robbins <arnold@skeeve.com>
+
Thanks to Andrew Schorr for suggestion of better way to
handle exec_count being a long long.
diff --git a/debug.c b/debug.c
index d6bb0bdd..26a67554 100644
--- a/debug.c
+++ b/debug.c
@@ -4433,8 +4433,8 @@ serialize_subscript(char *buf, int buflen, struct list_item *item)
}
-
-/* serialize_list--- convert a list structure to a byte stream and
+/*
+ * serialize_list--- convert a list structure to a byte stream and
* save in environment.
*/
@@ -4607,9 +4607,9 @@ enlarge_buffer:
}
if (nchar > 0) { /* non-empty commands list */
- nchar += (strlen("commands ") + 20/*cnum*/ + 1/*CSEP*/ + strlen("end") + 1/*FSEP*/);
+ nchar += (strlen("commands ") + 20 /*cnum*/ + 1 /*CSEP*/ + strlen("end") + 1 /*FSEP*/);
if (nchar >= buflen - bl) {
- buflen = bl + nchar + 1/*RSEP*/;
+ buflen = bl + nchar + 1 /*RSEP*/;
erealloc(buf, char *, buflen + 1, "serialize_list");
}
nchar = sprintf(buf + bl, "commands %d", cnum);
@@ -4645,8 +4645,8 @@ enlarge_buffer:
if (cndn->expr) {
bl--; /* undo RSEP from above */
nchar = strlen(cndn->expr);
- if (nchar + 1/*FSEP*/ >= buflen - bl) {
- buflen = bl + nchar + 1/*FSEP*/ + 1/*RSEP*/;
+ if (nchar + 1 /*FSEP*/ >= buflen - bl) {
+ buflen = bl + nchar + 1 /*FSEP*/ + 1 /*RSEP*/;
erealloc(buf, char *, buflen + 1, "serialize_list");
}
memcpy(buf + bl, cndn->expr, nchar);
diff --git a/extension/ChangeLog b/extension/ChangeLog
index addf9365..223b817d 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,24 @@
+2020-06-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ Miscellanious fixes from Michael Builov <mbuilov@gmail.com>.
+
+ * fts.c (fts_open): Fix memory leak: fts_sort() allocates
+ sp->fts_array, but it's not freed if next fts_alloc() fails.
+ (fts_build): Need to free "head" list before returning NULL
+ on failure.
+ * readdir.c (get_inode): On Windows handle leak: opened handle
+ was not closed.
+ * filefuncs.c (get_inode): On Windows handle leak: opened handle
+ was not closed.
+ (fill_stat_array): Correct the block size calculation.
+ (init_filefuncs, do_fts): According to the documentation,
+ setting the FTS_NOCHDIR flag should only disable the optimization of
+ changing the current directory when scanning directories.
+ However, setting this flag in the gawk script also included setting
+ FTS_SKIP, which prevented recursive directory traversal. Fix this.
+ * rwarray0.c (read_value): Result of read_array() is awk_bool_t,
+ not error code. Fix the check.
+
2020-04-14 Arnold D. Robbins <arnold@skeeve.com>
* 5.1.0: Release tar ball made.
diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog
index 2ae8093a..07939c2d 100644
--- a/missing_d/ChangeLog
+++ b/missing_d/ChangeLog
@@ -1,3 +1,9 @@
+2020-06-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ Miscellanious fixes from Michael Builov <mbuilov@gmail.com>.
+
+ * fnmatch.c (internal_fnmatch): Misc small fixes.
+
2020-04-14 Arnold D. Robbins <arnold@skeeve.com>
* 5.1.0: Release tar ball made.
diff --git a/missing_d/fnmatch.c b/missing_d/fnmatch.c
index 4da8c5fb..3e6e5cec 100644
--- a/missing_d/fnmatch.c
+++ b/missing_d/fnmatch.c
@@ -329,6 +329,8 @@ internal_fnmatch (pattern, string, no_leading_period, flags)
if (c == fn)
goto matched;
+
+ c = *p++;
}
else if (c == '[' && *p == ':')
{
@@ -353,7 +355,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags)
p += 2;
break;
}
- if (c < 'a' || c >= 'z')
+ if (c < 'a' || c > 'z')
{
/* This cannot possibly be a character class name.
Match it as a normal range. */
@@ -388,6 +390,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags)
|| (STREQ (str, "xdigit") && ISXDIGIT ((unsigned char) *n)))
goto matched;
# endif
+ c = *p++;
}
else if (c == '\0')
/* [ (unterminated) loses. */
@@ -398,7 +401,7 @@ internal_fnmatch (pattern, string, no_leading_period, flags)
if (FOLD (c) == fn)
goto matched;
- cold = c;
+ cold = FOLD(c);
c = *p++;
if (c == '-' && *p != ']')
diff --git a/test/ChangeLog b/test/ChangeLog
index cca09eb6..ca213e81 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2020-06-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ Miscellanious fixes from Michael Builov <mbuilov@gmail.com>.
+
+ * Gentests: Use correct locale for JP.
+
2020-06-08 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): New test, strfieldnum.