pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/comms/picocom



Module Name:    pkgsrc
Committed By:   khorben
Date:           Fri May  8 02:52:30 UTC 2026

Modified Files:
        pkgsrc/comms/picocom: Makefile distinfo
Added Files:
        pkgsrc/comms/picocom/patches: patch-picocom.c

Log Message:
comms/picocom: update to version 3.1

Changes in version 3.1:

* Added the --raise-dtr and --raise-rts options, for symmetry with
  --lower-dtr and --lower-rts (see manual page for details)
* Added custom baudrate support for FreeBSD, OpenBSD, and DragonflyBSD
  (in additions to Linux and MacOS that were already supported)
* Better build support for custom baudrates. Now custom baudrate support
  is enabled by default for some systems (for Linux, kernels > 2.6.0,
  x86, and x86_64, for Intel Macs with macOS / OSX >= 10.4, and for some
  BDSs).
  You can always explicitly enable custom baudrate support for other
  systems (see Makefile) and you can explicitly disable it, even for the
  systems it is automatically enabled for (again, see Makefile).
  To see if custom baudrate support is enabled in your build, run
  picocom with the --help command-line option

Changes in version 3.0:

* Added the --logfile command line option. For more, see discussion in
  issue #24, as well as the manual.
* Added the --lower-rts and --lower-dtr command-line options. These
  options lower (reset) the respective modem control lines of the serial
  port, as soon as picocom starts and the port is configured. For more
  details, see the manual as well as this discussion.
* Added the --initstring (or -t) command line option. This option can be
  used to send an initialization string to the serial port when picocom
  starts.
* Added the --exit-after (or -x) command line option. Causes picocom to
  exit if it becomes idle for the specified time.
* Added the -exit (or -X) command line option. Causes picocom to exit
  immediately after opening and configuring the serial port.
* Added the --quiet (or -q) command line option. Suppress output from
  picocom that was not explicitly requested by the user. Errors and
  command responses are still printed.
* Added the --no-escape (or -n) command line option. Disables the escape
  character. If given picocom will never enter command mode.
* Added the --hangup (or -u) comand line option. If given together with
  --noreset, picocom will not reset the serial port to it's original
  settings on exit, but it will clear the modem control lines (typically
  DTR and RTS) to signal a modem hangup.
* Added the [C-g] command that toggles the state of the RTS modem
  control line.
* Added the [C-w] command (write hex) that pompts the user for a string
  of hexadecimal values to be converted to binary and sent to the port.
* Added "to hex" character mappings (???hex), which replace characters
  with their hexadecimal representation. For more see issue #75, and the
  INPUT, OUTPUT, AND ECHO MAPPING section in the picocom manual.
* Standard input can now be a non-tty (e.g a file or a pipe). Useful in
  some occasions for doing trivial non-interactive stuff.
* Changed the way picocom handles reading zero-bytes from the standard
  input. Now picocom waits for the output queue to be transmitted before
  exiting, or waits to become idle before exiting (if the --exit-after
  option is given). See the new section EXITING PICOCOM in the manual
  for details.
* Picocom's serial port output queue is now dynamically growable. You
  can still set an upper limit when compiling picocom, or allow it to
  grow as much as your system's memory allows. Usueful, for example, for
  doing huge copy-pastes. See issue #33.
* Custom baudrates are now also supported for OSX (not only Linux). See
  PR #62.
* Fixed some minor backwards compatibility issues. Now you can use
  command-line options compatible with 1.x. For more details see issue
  #69, and PR #70.
* Now SIGINT, as well as SIGTERM, can kill picocom. May be useful when
  the standard input is not a tty.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/comms/picocom/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/comms/picocom/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/comms/picocom/patches/patch-picocom.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/comms/picocom/Makefile
diff -u pkgsrc/comms/picocom/Makefile:1.1 pkgsrc/comms/picocom/Makefile:1.2
--- pkgsrc/comms/picocom/Makefile:1.1   Sun Feb 14 07:54:51 2016
+++ pkgsrc/comms/picocom/Makefile       Fri May  8 02:52:30 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2016/02/14 07:54:51 ryoon Exp $
+# $NetBSD: Makefile,v 1.2 2026/05/08 02:52:30 khorben Exp $
 
-DISTNAME=      picocom-2.1
+DISTNAME=      picocom-3.1
 CATEGORIES=    comms
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=npat-efault/}
 GITHUB_PROJECT=        picocom

Index: pkgsrc/comms/picocom/distinfo
diff -u pkgsrc/comms/picocom/distinfo:1.3 pkgsrc/comms/picocom/distinfo:1.4
--- pkgsrc/comms/picocom/distinfo:1.3   Tue Oct 26 10:06:04 2021
+++ pkgsrc/comms/picocom/distinfo       Fri May  8 02:52:30 2026
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:06:04 nia Exp $
+$NetBSD: distinfo,v 1.4 2026/05/08 02:52:30 khorben Exp $
 
-BLAKE2s (picocom-2.1.tar.gz) = 41497c357f6ae6172c45957515f3da84e06f9a6986ef19a527ed5e7c5ca4f132
-SHA512 (picocom-2.1.tar.gz) = 0df692118e3cfa27edd8ff9d5abbde8a9dc02fb015476ab1469337d616eb69411db125a967107276fb50bc58e7b9748429b9ded4943712a082a10827d595c03e
-Size (picocom-2.1.tar.gz) = 89281 bytes
+BLAKE2s (picocom-3.1.tar.gz) = ccb21a4da0217c3e8c4649fef7030d9df0aad67a99ff3a8c073f6f55046b80ab
+SHA512 (picocom-3.1.tar.gz) = ff1888494ae0e24a151e19ac3abcdbb499e42eb1abcea401a7c6c3b532be3d64ddd81a511641d1ce0119dc5da3d2804ce8eaff262a9d578bfe8e22fdf6e55ad1
+Size (picocom-3.1.tar.gz) = 121686 bytes
+SHA1 (patch-picocom.c) = ebff5811c338bd53443715e0aeafcbe69ba12718

Added files:

Index: pkgsrc/comms/picocom/patches/patch-picocom.c
diff -u /dev/null pkgsrc/comms/picocom/patches/patch-picocom.c:1.1
--- /dev/null   Fri May  8 02:52:31 2026
+++ pkgsrc/comms/picocom/patches/patch-picocom.c        Fri May  8 02:52:30 2026
@@ -0,0 +1,31 @@
+$NetBSD: patch-picocom.c,v 1.1 2026/05/08 02:52:30 khorben Exp $
+
+Avoid a potential use after free condition:
+
+cc -O2 -Wall -g  -DVERSION_STR=\"3.1\" -DTTY_Q_SZ=0 -DHIGH_BAUD -DUSE_FLOCK -DHISTFILE=\".picocom_history\"  -DLINENOISE -o picocom.o -c picocom.c
+picocom.c: In function 'read_baud':                                                                                                                                                                    
                                      
+picocom.c:608:9: warning: pointer 'baudstr' may be used after 'free' [-Wuse-after-free]                                                                                                                
                                      
+  608 |         add_history(baudstr);                                                                                                                                                                  
                                      
+      |         ^~~~~~~~~~~~~~~~~~~~                                                                                                                                                                   
                                      
+picocom.c:604:9: note: call to 'free' here                                                                                                                                                             
                                      
+  604 |         free(baudstr);                                                                                                                                                                         
                                      
+      |         ^~~~~~~~~~~~~                                                                                                                                                                          
                                      
+
+--- picocom.c.orig     2026-04-26 13:38:46.249642608 +0000
++++ picocom.c
+@@ -601,12 +601,12 @@ read_baud (void)
+             fd_printf(STO, "*** Invalid baudrate!");
+             baud = -1;
+         }
++
++      if (baud >= 0 && baudstr != NULL)
++              add_history(baudstr);
+         free(baudstr);
+     } while (baud < 0);
+ 
+-    if (baudstr != NULL)
+-        add_history(baudstr);
+-
+     return baud;
+ }
+ 



Home | Main Index | Thread Index | Old Index