diff --git a/Makefile.in b/Makefile.in index df51d758..664b2718 100644 --- a/Makefile.in +++ b/Makefile.in @@ -203,8 +203,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libgtop-2.0.pc.in $(srcdir)/libgtop.spec.in \ $(srcdir)/libgtopconfig.h.in ABOUT-NLS AUTHORS COPYING \ ChangeLog INSTALL NEWS README compile config.guess \ - config.rpath config.sub depcomp install-sh ltconfig ltmain.sh \ - missing + config.rpath config.sub install-sh ltconfig ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) diff --git a/NEWS b/NEWS index 90b54dab..793c7c45 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +16 February 2024: Overview of changes in 2.41.3 +================================================ + +* Fixed daemon buffer overflow #72 +* Updated translations + 15 October 2023: Overview of changes in 2.41.2 ================================================ diff --git a/configure b/configure index 00af6796..18c6b191 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libgtop 2.41.2. +# Generated by GNU Autoconf 2.71 for libgtop 2.41.3. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libgtop' PACKAGE_TARNAME='libgtop' -PACKAGE_VERSION='2.41.2' -PACKAGE_STRING='libgtop 2.41.2' +PACKAGE_VERSION='2.41.3' +PACKAGE_STRING='libgtop 2.41.3' PACKAGE_BUGREPORT='https://gitlab.gnome.org/GNOME/libgtop/-/issues/' PACKAGE_URL='' @@ -1478,7 +1478,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libgtop 2.41.2 to adapt to many kinds of systems. +\`configure' configures libgtop 2.41.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1553,7 +1553,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libgtop 2.41.2:";; + short | recursive ) echo "Configuration of libgtop 2.41.3:";; esac cat <<\_ACEOF @@ -1694,7 +1694,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libgtop configure 2.41.2 +libgtop configure 2.41.3 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2110,7 +2110,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libgtop $as_me 2.41.2, which was +It was created by libgtop $as_me 2.41.3, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3462,7 +3462,7 @@ fi # Define the identity of the package. PACKAGE='libgtop' - VERSION='2.41.2' + VERSION='2.41.3' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3958,13 +3958,13 @@ LIBGTOP_MAJOR_VERSION=2 LIBGTOP_MINOR_VERSION=41 -LIBGTOP_MICRO_VERSION=2 +LIBGTOP_MICRO_VERSION=3 LIBGTOP_SERVER_VERSION=5 -LIBGTOP_VERSION=2.41.2 +LIBGTOP_VERSION=2.41.3 -LIBGTOP_VERSION_CODE=2041002 +LIBGTOP_VERSION_CODE=2041003 # libtool versioning @@ -21878,13 +21878,13 @@ AM_CPPFLAGS="-I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysde printf "%s\n" "#define _IN_LIBGTOP 1" >>confdefs.h -printf "%s\n" "#define LIBGTOP_VERSION \"2.41.2\"" >>confdefs.h +printf "%s\n" "#define LIBGTOP_VERSION \"2.41.3\"" >>confdefs.h printf "%s\n" "#define LIBGTOP_SERVER_VERSION \"5\"" >>confdefs.h -printf "%s\n" "#define LIBGTOP_VERSION_CODE 2041002" >>confdefs.h +printf "%s\n" "#define LIBGTOP_VERSION_CODE 2041003" >>confdefs.h printf "%s\n" "#define LIBGTOP_SERVER \"$LIBGTOP_SERVER\"" >>confdefs.h @@ -22886,7 +22886,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libgtop $as_me 2.41.2, which was +This file was extended by libgtop $as_me 2.41.3, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22954,7 +22954,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libgtop config.status 2.41.2 +libgtop config.status 2.41.3 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 6204a5e2..db2a48bb 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl m4_define([libgtop_major_version], [2]) m4_define([libgtop_minor_version], [41]) -m4_define([libgtop_micro_version], [2]) +m4_define([libgtop_micro_version], [3]) m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version]) dnl increment if the interface has additions, changes, removals. diff --git a/doc/libgtop2.info b/doc/libgtop2.info index cc8a9143..3be4affe 100644 --- a/doc/libgtop2.info +++ b/doc/libgtop2.info @@ -8,7 +8,7 @@ START-INFO-DIR-ENTRY processes END-INFO-DIR-ENTRY -This is the LibGTop Reference Manual version 2.41.2 (last modified 27 +This is the LibGTop Reference Manual version 2.41.3 (last modified 27 November 2016). Copyright 1999 Free Software Foundation, Inc. diff --git a/doc/reference/html/index.html b/doc/reference/html/index.html index b3054584..2da4e4be 100644 --- a/doc/reference/html/index.html +++ b/doc/reference/html/index.html @@ -33,7 +33,7 @@   

-

for libgtop 2.41.2

+

for libgtop 2.41.3

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free diff --git a/doc/reference/version.xml b/doc/reference/version.xml index 559bb8d9..0b6e6269 100644 --- a/doc/reference/version.xml +++ b/doc/reference/version.xml @@ -1,4 +1,4 @@ -2.41.2 +2.41.3 diff --git a/doc/stamp-vti b/doc/stamp-vti index 499255fd..ccef0cb7 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ @set UPDATED 27 November 2016 @set UPDATED-MONTH November 2016 -@set EDITION 2.41.2 -@set VERSION 2.41.2 +@set EDITION 2.41.3 +@set VERSION 2.41.3 diff --git a/doc/version.texi b/doc/version.texi index 499255fd..ccef0cb7 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ @set UPDATED 27 November 2016 @set UPDATED-MONTH November 2016 -@set EDITION 2.41.2 -@set VERSION 2.41.2 +@set EDITION 2.41.3 +@set VERSION 2.41.3 diff --git a/libgtop.spec b/libgtop.spec index 5807fae0..07869f7a 100644 --- a/libgtop.spec +++ b/libgtop.spec @@ -1,5 +1,5 @@ # Note that this is NOT a relocatable package -%define ver 2.41.2 +%define ver 2.41.3 %define RELEASE SNAP %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} %define prefix /usr diff --git a/libgtopconfig.h b/libgtopconfig.h index fdcca1e9..642aed57 100644 --- a/libgtopconfig.h +++ b/libgtopconfig.h @@ -3,6 +3,6 @@ #define LIBGTOP_MAJOR_VERSION 2 #define LIBGTOP_MINOR_VERSION 41 -#define LIBGTOP_MICRO_VERSION 2 +#define LIBGTOP_MICRO_VERSION 3 #endif /* LIBGTOPCONFIG_H */ diff --git a/po/tr.gmo b/po/tr.gmo index 570308d6..688030ef 100644 Binary files a/po/tr.gmo and b/po/tr.gmo differ diff --git a/po/tr.po b/po/tr.po index 2d1de2e9..0dbddbe1 100644 --- a/po/tr.po +++ b/po/tr.po @@ -12,16 +12,16 @@ msgid "" msgstr "" "Project-Id-Version: libgtop\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgtop/issues\n" -"POT-Creation-Date: 2023-01-25 20:47+0000\n" -"PO-Revision-Date: 2017-09-05 07:33+0300\n" -"Last-Translator: Emin Tufan Çetin \n" +"POT-Creation-Date: 2023-08-08 10:47+0000\n" +"PO-Revision-Date: 2023-10-24 02:11+0300\n" +"Last-Translator: Sabri Ünal \n" "Language-Team: Türkçe \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Gtranslator 2.91.7\n" +"X-Generator: Poedit 3.4\n" #: lib/read.c:49 #, c-format @@ -106,7 +106,7 @@ msgstr "Öldür" #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 msgid "Bus error" -msgstr "Veriyolu hatası" +msgstr "Veri yolu hatası" #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 msgid "Segmentation violation" diff --git a/src/daemon/main.c b/src/daemon/main.c index 47a94586..58a61412 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -61,25 +61,31 @@ handle_parent_connection (int s) "Parent (%d) received command %lu from client.", getpid (), cmnd->command); - if (cmnd->data_size >= BUFSIZ) { - syslog_message (LOG_WARNING, - "Client sent %lu bytes, but buffer is %lu", - cmnd->data_size, (unsigned long)BUFSIZ); - return; - } - memset (resp, 0, sizeof (glibtop_response)); memset (parameter, 0, sizeof (parameter)); if (cmnd->data_size) { + if (cmnd->data_size >= BUFSIZ) { + syslog_message (LOG_WARNING, + "Client sent %lu bytes, but buffer is %lu", + cmnd->data_size, (unsigned long)BUFSIZ); + return; + } + if (enable_debug) syslog_message (LOG_DEBUG, "Client has %lu bytes of data.", cmnd->data_size); do_read (s, parameter, cmnd->data_size); - } else if (cmnd->size) { + if (cmnd->size >= BUFSIZ) { + syslog_message (LOG_WARNING, + "Client sent %lu bytes, but buffer is %lu", + cmnd->size, (unsigned long)BUFSIZ); + return; + } + memcpy (parameter, cmnd->parameter, cmnd->size); } diff --git a/src/daemon/slave.c b/src/daemon/slave.c index 80b2b5ab..25bd19e7 100644 --- a/src/daemon/slave.c +++ b/src/daemon/slave.c @@ -44,22 +44,26 @@ handle_slave_connection (int input, int output) glibtop_debug ("Slave %d received command " "%lu from client.", getpid (), cmnd->command); - if (cmnd->data_size >= BUFSIZ) - glibtop_error ("Client sent %lu bytes, " - "but buffer is %lu", - cmnd->size, (unsigned long)BUFSIZ); - memset (resp, 0, sizeof (glibtop_response)); memset (parameter, 0, sizeof (parameter)); if (cmnd->data_size) { + if (cmnd->data_size >= BUFSIZ) + glibtop_error ("Client sent %lu bytes, " + "but buffer is %lu", + cmnd->data_size, (unsigned long)BUFSIZ); + glibtop_debug ("Client has %lu bytes of data.", cmnd->data_size); do_read (input, parameter, cmnd->data_size); - } else if (cmnd->size) { + if (cmnd->size >= BUFSIZ) + glibtop_error ("Client sent %lu bytes, " + "but buffer is %lu", + cmnd->size, (unsigned long)BUFSIZ); + memcpy (parameter, cmnd->parameter, cmnd->size); }