[AC 21.5] Add files for distribution packaging.
10 years
Jerry James
APPROVE COMMIT 21.5
On Thu, Dec 11, 2014 at 1:26 AM, Michael Sperber
<sperber(a)deinprogramm.de> wrote:
>
> Jerry James <james(a)xemacs.org> writes:
>
>> On Tue, Dec 9, 2014 at 12:33 AM, Michael Sperber
>> <sperber(a)deinprogramm.de> wrote:
>>> Jerry James <james(a)xemacs.org> writes:
>>>
>>>> http://xemacs.jamezone.org/xemacs-icon.svg
>>>
>>> I'm sure it's fine, but I get (on this file only):
>>>
>>> 403 Permission Denied
>>> You do not have permission for this request /xemacs-icon.svg
>>
>> I probably ought to give you permission to view the file, then, huh?
>> Fixed. Sorry about that.
>
> Looks good, thanks!
Since nobody has objected, I'm going to push this patch momentarily.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH 21.5] dumper fixes for problems Coverity Scan found
10 years
Marcus Crestani
PATCH 21.5
Coverity Scan reports some problems in dumper.c. Here a four changesets
that fix the reported problems:
diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-13 Marcus Crestani <crestani(a)xemacs.org>
+
+ * dumper.c (pdump): fdopen returns NULL when it fails.
+
2014-12-05 Jerry James <james(a)xemacs.org>
* src/fileio.c (Ffile_truename): Fix off-by-one error.
diff --git a/src/dumper.c b/src/dumper.c
--- a/src/dumper.c
+++ b/src/dumper.c
@@ -2135,7 +2135,7 @@
report_file_error ("Unable to open dump file",
build_ascstring (EMACS_PROGNAME ".dmp"));
pdump_out = fdopen (pdump_fd, "w");
- if (pdump_out < 0)
+ if (pdump_out == NULL)
report_file_error ("Unable to open dump file for writing",
build_ascstring (EMACS_PROGNAME ".dmp"));
+2014-12-13 Marcus Crestani <crestani(a)xemacs.org>
+
+ * dumper.c (pdump_file_get): Check return value of lseek.
+
2014-12-13 Marcus Crestani <crestani(a)xemacs.org>
* dumper.c (pdump): fdopen returns NULL when it fails.
diff --git a/src/dumper.c b/src/dumper.c
--- a/src/dumper.c
+++ b/src/dumper.c
@@ -2553,7 +2553,11 @@
return 0;
}
- lseek (fd, 0, SEEK_SET);
+ if (lseek (fd, 0, SEEK_SET) == -1)
+ {
+ retry_close (fd);
+ return 0;
+ }
#ifdef HAVE_MMAP
/* Unix 98 requires that sys/mman.h define MAP_FAILED,
diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-13 Marcus Crestani <crestani(a)xemacs.org>
+
+ * dumper.c (pdump_align_stream):
+ * dumper.c (pdump): Check return value of fseek.
+
2014-12-13 Marcus Crestani <crestani(a)xemacs.org>
* dumper.c (pdump_file_get): Check return value of lseek.
diff --git a/src/dumper.c b/src/dumper.c
--- a/src/dumper.c
+++ b/src/dumper.c
@@ -206,7 +206,13 @@
OFF_T offset = FTELL (stream);
OFF_T adjustment = ALIGN_SIZE (offset, alignment) - offset;
if (adjustment)
- FSEEK (stream, adjustment, SEEK_CUR);
+ {
+ if (FSEEK (stream, adjustment, SEEK_CUR) == -1)
+ {
+ report_file_error ("Unable to fseek dump file",
+ build_ascstring (EMACS_PROGNAME ".dmp"));
+ }
+ }
}
#define PDUMP_ALIGN_OUTPUT(type) pdump_align_stream (pdump_out, ALIGNOF (type))
@@ -2168,7 +2174,11 @@
elt->fcts->convert_free(elt->object, elt->data, elt->size);
}
- FSEEK (pdump_out, header.stab_offset, SEEK_SET);
+ if (FSEEK (pdump_out, header.stab_offset, SEEK_SET) == -1)
+ {
+ report_file_error ("Unable to fseek dump file",
+ build_ascstring (EMACS_PROGNAME ".dmp"));
+ }
#ifdef NEW_GC
{
diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-13 Marcus Crestani <crestani(a)xemacs.org>
+
+ * dumper.c (pdump_register_sub): Don't leave fields uninitialized.
+
2014-12-13 Marcus Crestani <crestani(a)xemacs.org>
* dumper.c (pdump_align_stream):
diff --git a/src/dumper.c b/src/dumper.c
--- a/src/dumper.c
+++ b/src/dumper.c
@@ -850,6 +850,8 @@
{
pdump_cv_ptr_info info;
info.object = *(void **)rdata;
+ info.index = 0;
+ info.save_offset = 0;
info.fcts = desc1->data2.funcs;
if (!pdump_find_in_cv_ptr_dynarr (info.object))
{
@@ -863,6 +865,8 @@
pdump_cv_data_info info;
info.object = data;
info.offset = offset;
+ info.dest_offset = 0;
+ info.save_offset = 0;
info.fcts = desc1->data2.funcs;
info.fcts->convert(rdata, &info.data, &info.size);
I'll push these changes in three days if nobody objects.
--
Marcus
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH 21.5] Add files for distribution packaging.
10 years
Jerry James
PATCH 21.5
On Sun, Dec 7, 2014 at 9:15 PM, Mail Delivery Subsystem
<mailer-daemon(a)googlemail.com> wrote:
> This is an automatically generated Delivery Status Notification
>
> THIS IS A WARNING MESSAGE ONLY.
>
> YOU DO NOT NEED TO RESEND YOUR MESSAGE.
>
> Delivery to the following recipient has been delayed:
>
> xemacs-patches(a)xemacs.org
>
> Message will be retried for 1 more day(s)
>
> Technical details of temporary failure:
> Google tried to deliver your message, but it was rejected by the server for the recipient domain xemacs.org by mail.xemacs.org. [207.172.156.133].
>
> The error that the other server returned was:
> 451 4.7.1 Greylisting in action, please come back later
Experience shows that once this starts, it doesn't stop. My message
will be returned to me tomorrow marked undeliverable, i guarantee it.
Well, first, here is what I originally said about this patch:
> This patch (attached) adds 3 files for use by distribution packagers, namely:
> - xemacs.appdata.xml: provides AppData metadata [1]
> - xemacs.desktop: provides desktop metadata [2]
> - xemacs-icon.svg: scalable version of one of our icons
>
> This change doesn't require any build system work. These files are
> simply dumped into etc for use by interested distribution packagers.
> Everyone else can ignore them.
>
> Footnotes:
> [1] http://people.freedesktop.org/~hughsient/appdata/
> [2] http://standards.freedesktop.org/desktop-entry-spec/latest/
Since I apparently can't send these files as email attachments, I have
instead put them on a web server I happen to have access to. They
will only be there temporarily, until this patch is accepted or
rejected. Get the files here:
http://xemacs.jamezone.org/xemacs.appdata.xml
http://xemacs.jamezone.org/xemacs.desktop
http://xemacs.jamezone.org/xemacs-icon.svg
The idea is to drop all 3 of them into etc.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC 21.5] gnuserv leaks file descriptors
10 years
Jerry James
APPROVE COMMIT 21.5
On Fri, Dec 5, 2014 at 4:09 PM, Jerry James <james(a)xemacs.org> wrote:
> Coverity Scan reports that gnuserv is leaking file descriptors. While
> fixing that, I noticed that handle_unix_request() calls echo_request()
> even when accept() returns -1, which isn't right. This patch fixes
> both problems.
Upon looking at this one more time, I am convinced that this patch is
correct, so I am pushing it.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC 21.5] Fix off-by-one error in file-truename
10 years
Jerry James
APPROVE COMMIT 21.5
This is another obviously correct fix. The problem was found by
Coverity Scan. Near the end of file-truename, we make sure that rlen
is a valid array index before inserting a directory separator and a
null terminator. However, we need to make sure that rlen + 1 is a
valid array index, since that is where the null terminator goes.
I will commit and push this shortly.
diff -r 7984e732829e src/ChangeLog
--- a/src/ChangeLog Fri Dec 05 16:22:57 2014 -0700
+++ b/src/ChangeLog Fri Dec 05 16:45:24 2014 -0700
@@ -1,3 +1,7 @@
+2014-12-05 Jerry James <james(a)xemacs.org>
+
+ * src/fileio.c (Ffile_truename): Fix off-by-one error.
+
2014-11-23 Michael Sperber <mike(a)xemacs.org>
* font-mgr.c (Ffc_name_unparse): Do the previous change to this
diff -r 7984e732829e src/fileio.c
--- a/src/fileio.c Fri Dec 05 16:22:57 2014 -0700
+++ b/src/fileio.c Fri Dec 05 16:45:24 2014 -0700
@@ -1466,7 +1466,7 @@
if (elen > 0 && IS_DIRECTORY_SEP (string_byte (expanded_name, elen - 1))
&& !(rlen > 0 && IS_DIRECTORY_SEP (resolved_path[rlen - 1])))
{
- if (rlen + 1 > countof (resolved_path))
+ if (rlen + 1 >= countof (resolved_path))
goto toolong;
resolved_path[rlen++] = DIRECTORY_SEP;
resolved_path[rlen] = '\0';
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC 21.5] Fix file descriptor leak in pop.c
10 years
Jerry James
APPROVE COMMIT 21.5
I think this is one is obvious enough to fall under the obviously
correct rule. The socket_connection() function in lib-src/pop.c
closes the socket before returning on error in all but one case. This
patch fixes up the remaining case. This bug was found by Coverity
Scan.
I will commit and push this patch shortly.
diff -r b8316d3409cd lib-src/ChangeLog
--- a/lib-src/ChangeLog Fri Nov 28 00:18:03 2014 +0000
+++ b/lib-src/ChangeLog Fri Dec 05 16:18:49 2014 -0700
@@ -1,3 +1,8 @@
+2014-12-05 Jerry James <james(a)xemacs.org>
+
+ * pop.c (socket_connection): Do not leak a socket if the POP
+ server's address cannot be determined.
+
2014-10-18 Aidan Kehoe <kehoea(a)parhasard.net>
* ootags.c (substitute):
diff -r b8316d3409cd lib-src/pop.c
--- a/lib-src/pop.c Fri Nov 28 00:18:03 2014 +0000
+++ b/lib-src/pop.c Fri Dec 05 16:18:49 2014 -0700
@@ -1075,6 +1075,7 @@
try_count++;
if ((! hostent) && ((h_errno != TRY_AGAIN) || (try_count == 5)))
{
+ CLOSESOCKET (sock);
strcpy (pop_error, "Could not determine POP server's address");
return (-1);
}
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH 21.5] gnuserv leaks file descriptors
10 years
Jerry James
PATCH 21.5
Coverity Scan reports that gnuserv is leaking file descriptors. While
fixing that, I noticed that handle_unix_request() calls echo_request()
even when accept() returns -1, which isn't right. This patch fixes
both problems.
diff -r b8316d3409cd lib-src/ChangeLog
--- a/lib-src/ChangeLog Fri Nov 28 00:18:03 2014 +0000
+++ b/lib-src/ChangeLog Fri Dec 05 16:07:44 2014 -0700
@@ -1,3 +1,8 @@
+2014-12-05 Jerry James <james(a)xemacs.org>
+
+ * gnuserv.c (echo_request): close the socket when done
+ (handle_unix_request): do not call echo_request on accept failure
+
2014-10-18 Aidan Kehoe <kehoea(a)parhasard.net>
* ootags.c (substitute):
diff -r b8316d3409cd lib-src/gnuserv.c
--- a/lib-src/gnuserv.c Fri Nov 28 00:18:03 2014 +0000
+++ b/lib-src/gnuserv.c Fri Dec 05 16:07:44 2014 -0700
@@ -321,6 +321,7 @@
exit(1);
} /* if */
+ close(s);
} /* echo_request */
@@ -858,6 +859,7 @@
{
perror(progname);
fprintf(stderr,"%s: unable to accept\n",progname);
+ return;
} /* if */
echo_request(s);
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches