Compare commits

..
10 Commits
Author SHA1 Message Date
Joachim Wiberg c1e050f93c Update ChangeLog and bump version for v2.6.2 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-22 21:59:46 +01:00
Joachim Wiberg 0e45929323 Make note of possible extensions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-22 21:44:20 +01:00
Joachim Wiberg 958502d982 Fix memory leak in which() on realloc() failure
Avoid leaking memory when realloc() fails by using a temporary pointer
and only updating the original on success. Also remove redundant NULL
check before free().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-22 20:48:35 +01:00
Joachim Wiberg f0cb0b7bf2 .github: bump actions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-28 08:34:00 +02:00
Joachim Wiberg ee5788d49b Create SECURITY.md policy 2025-04-28 07:54:35 +02:00
Joachim Wiberg 9bfe54f959 pidfile(): ensure prefix path ends with slash
For some builds using Buildroot, the system default _PATH_VARRUN did not
include a trailing slas '/', which cause the pidfile() function to fail.

Example:
  pidfile("arg") => "/var/runarg.pid"

Since the __pidfile_path can be overridden we add a check if that prefix
path ends with '/', if not we add one in the path composition.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-03-25 05:23:41 +01:00
Joachim Wiberg 960e7f69ed Update changelog and bump version for v2.6.1 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-15 10:22:36 +02:00
Joachim Wiberg 68bc83f08f FTBFS uClibc and musl libc, lite.h missing stdarg.h include
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-15 10:21:30 +02:00
Joachim Wiberg 986d29caf0 m4: sync with latest ax_prog_doxygen.m4
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-15 10:18:33 +02:00
Joachim Wiberg 2d9f8f595d Update ChangeLog and bump version to v2.6.0 GA
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-09-17 16:59:24 +02:00
11 changed files with 72 additions and 21 deletions

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# Security Policy
## Supported Versions
libite (-lite) is a small project, as such we have no possibility to support older versions.
The only supported version is the latest released on GitHub:
<https://github.com/troglobit/libite/releases>
## Reporting a Vulnerability
Contact the project's main author and owner to report and discuss vulnerabilities.
+3 -3
View File
@@ -28,7 +28,7 @@ jobs:
run: |
sudo apt-get -y update
sudo apt-get -y install tree doxygen
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure
run: |
./autogen.sh
@@ -44,7 +44,7 @@ jobs:
run: |
make check || (cat test/test-suite.log; false)
- name: Upload Test Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: libite-test-${{ matrix.compiler }}
path: test/*
@@ -55,7 +55,7 @@ jobs:
env:
MAKEFLAGS: -j3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installing dependencies
run: |
apt-get update
+3 -3
View File
@@ -15,7 +15,7 @@ jobs:
coverity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch latest Coverity Scan MD5
id: var
env:
@@ -25,7 +25,7 @@ jobs:
--post-data "token=$TOKEN&project=${COVERITY_PROJ}&md5=1" \
-O coverity-latest.tar.gz.md5
echo "md5=$(cat coverity-latest.tar.gz.md5)" | tee -a $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: coverity-latest.tar.gz
@@ -74,7 +74,7 @@ jobs:
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
https://scan.coverity.com/builds?project=${COVERITY_PROJ}
- name: Upload build.log
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverity-build.log
path: cov-int/build-log.txt
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Installing dependencies ...
run: |
sudo apt-get -y update
+20 -3
View File
@@ -4,8 +4,23 @@ Change Log
All notable changes to the project are documented in this file.
[v2.6.0][UNRELEASED]
--------------------
[v2.6.2][] - 2025-11-22
-----------------------
### Fixes
- Fix memory leak in `which()` on `realloc()` failure
- Fix `pidfile()` to handle missing trailing slash in prefix path
[v2.6.1][] - 2023-10-15
-----------------------
### Fixes
- FTBFS uClibc and musl libc, `lite.h` missing `stdarg.h` include
[v2.6.0][] - 2023-09-17
-----------------------
### Changes
- New APIs from the [Infix Project](https://github.com/kernelkit/infix):
@@ -504,7 +519,9 @@ problems this may cause!
Initial extraction of frog DNA from [Finit][]. See [README][] for API details.
[UNRELEASED]: https://github.com/troglobit/libite/compare/v2.5.3...HEAD
[UNRELEASED]: https://github.com/troglobit/libite/compare/v2.6.2...HEAD
[v2.6.2]: https://github.com/troglobit/libite/compare/v2.6.1...v2.6.2
[v2.6.1]: https://github.com/troglobit/libite/compare/v2.6.0...v2.6.1
[v2.6.0]: https://github.com/troglobit/libite/compare/v2.5.3...v2.6.0
[v2.5.3]: https://github.com/troglobit/libite/compare/v2.5.2...v2.5.3
[v2.5.2]: https://github.com/troglobit/libite/compare/v2.5.1...v2.5.2
+14
View File
@@ -1 +1,15 @@
* TODO Write tests for new APIs
* More formatted variants?
- symlinkf()
- accessf()
- statf() / lstatf()
* Relocate from Finit
- fnread()
- fnwrite()
- fngetint()
- paste()
- unquote()
+1 -1
View File
@@ -1,4 +1,4 @@
AC_INIT(libite, 2.6.0-rc1, https://github.com/troglobit/libite/issues)
AC_INIT(libite, 2.6.2, https://github.com/troglobit/libite/issues)
AC_CONFIG_AUX_DIR(aux)
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
AM_SILENT_RULES([yes])
+3 -3
View File
@@ -21,7 +21,7 @@
# The DX_*_FEATURE macros control the default setting for the given
# Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for
# generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML
# help (for MS users), 'CHI' for generating a seperate .chi file by the
# help (for MS users), 'CHI' for generating a separate .chi file by the
# .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate
# output formats. The environment variable DOXYGEN_PAPER_SIZE may be
# specified to override the default 'a4wide' paper size.
@@ -321,8 +321,8 @@ DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
[DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
# Seperate CHI file generation.
DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
# Separate CHI file generation.
DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file],
[DX_CHECK_DEPEND(chm, 1)],
[DX_CLEAR_DEPEND(chm, 1)],
[],
+1
View File
@@ -44,6 +44,7 @@ extern "C"
#include <errno.h>
#include <fcntl.h> /* Definition of AT_* constants for utimensat() */
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h> /* uint8_t, uint16_t, uint32_t, INT32_MAX, etc. */
#include <sys/stat.h>
#include <sys/types.h>
+5 -1
View File
@@ -45,6 +45,7 @@
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifndef pidfile
@@ -93,7 +94,10 @@ int pidfile(const char *basename)
}
if (basename[0] != '/') {
if (asprintf(&pidfile_path, "%s%s.pid", __pidfile_path, basename) == -1)
size_t len = strlen(__pidfile_path);
int slash = __pidfile_path[len > 0 ? len - 1 : 0] != '/';
if (asprintf(&pidfile_path, "%s%s%s.pid", __pidfile_path, slash ? "/" : "", basename) == -1)
return (-1);
} else {
if (asprintf(&pidfile_path, "%s", basename) == -1)
+9 -6
View File
@@ -53,8 +53,9 @@ static char *strip_args(char *path)
*/
char *which(const char *cmd)
{
char *ptr, *env, *path = NULL;
size_t pathlen = 0;
char *ptr, *tok, *env, *path = NULL;
const char *tok;
if (!cmd) {
errno = EINVAL;
@@ -69,9 +70,7 @@ char *which(const char *cmd)
if (!access(path, X_OK))
return path;
if (path)
free(path);
free(path);
return NULL;
}
@@ -88,11 +87,15 @@ char *which(const char *cmd)
size_t len = strlen(tok) + strlen(cmd) + 2;
if (pathlen < len) {
path = realloc(path, len);
if (!path) {
char *tmp = realloc(path, len);
if (!tmp) {
free(path);
free(env);
return NULL;
}
path = tmp;
pathlen = len;
}