Changelog
All notable changes to the atrforge tools will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
New Features
-
UTF8/ATASCII Conversion Support (2026-01-21): Added comprehensive UTF8 ↔ ATASCII conversion functionality across all tools, allowing seamless editing of ATASCII files in modern UTF8 editors:
- New shared conversion library (
src/convert.c,src/convert.h) based on example implementation - convertatr: Added
--convert-utf8and--convert-atasciioptions to convert files during ATR resize/sector conversion operations - atrcp: Added
--to-utf8,--to-atascii, and--7bitoptions:--to-utf8: Convert ATASCII to UTF8 when extracting files from ATR--to-atascii: Convert UTF8 to ATASCII when adding files to ATR--7bit: Use 7-bit mode (strip high bit) for ATASCII→UTF8 conversion
- atrforge: Added
--to-atasciioption to convert files from UTF8 to ATASCII when creating or adding to ATR images - Conversion handles newline conversion (0x0a ↔ 155) and UTF8 multi-byte sequences
- Files affected:
src/convert.c,src/convert.h,src/convertatr.c,src/convertatr_main.c,src/atrcp.c,src/mkatr.c,src/flist.c,src/flist.h,Makefile
- New shared conversion library (
-
ATR File Copy Tool (2026-01-21): New
atrcpprogram for copying files between ATR images and the host filesystem:- Extract files from ATR images:
atrcp image.atr:path/to/file.ext output.ext - Add files to ATR images:
atrcp input.ext image.atr:path/to/file.ext - Supports SpartaDOS/BW-DOS filesystem format
- Creates automatic backups when modifying ATR files
- Files affected:
src/atrcp.c,Makefile
- Extract files from ATR images:
-
ATR File Modification (2026-01-21): Added ability to add files to existing ATR images using the
-aoption inatrforge. This creates a backup of the original file before modification.- Files affected:
src/mkatr.c,src/modatr.c,src/modatr.h - Note: Full in-place modification (delete/rename) requires additional implementation
- Files affected:
-
ATR Conversion Tool (2026-01-21): New
convertatrprogram for converting and resizing ATR images:- Resize images to different sector counts
- Convert between 128-byte and 256-byte sector sizes
- Files affected:
src/convertatr.c,src/convertatr.h,src/convertatr_main.c
New Features (from previous release)
- Enhanced CLI Options (2026-01-21): Added new command-line options to
lsatr:-q(quiet mode): Suppress informational messages-f(force overwrite): Allow overwriting existing files during extraction--verify: Verify ATR image integrity (checks if image loads correctly and has valid structure)- Files affected:
src/lsatr.c,src/msg.c,src/msg.h,src/lssfs.c,src/lsdos.c,src/lsextra.c,src/lshowfen.c
Security Fixes
-
Path Traversal Prevention (2026-01-21): Added comprehensive path sanitization to prevent directory traversal attacks when extracting files from ATR images. All file paths are now validated to remove
..components and reject absolute paths.- Implemented
sanitize_path()function incompat.c - Applied path sanitization in
lssfs.c,lsdos.c, andlsextra.c - Files affected:
src/compat.c,src/compat.h,src/lssfs.c,src/lsdos.c,src/lsextra.c
- Implemented
-
Unchecked asprintf Return Values (2026-01-21): Added error checking for all
asprintf()calls to handle memory allocation failures properly.- Files affected:
src/lssfs.c,src/lsdos.c,src/lsextra.c
- Files affected:
-
Unsafe String Operations (2026-01-21): Replaced unsafe
strcpy()andstrcat()calls with bounds-checked alternatives (strncpy(),snprintf()).- Files affected:
src/lsextra.c,src/flist.c
- Files affected:
-
Sector Number Validation (2026-01-21): Added comprehensive sector number validation in all sector access functions to prevent out-of-bounds access.
- Added validation in
file_msize()andread_file()inlssfs.c - Added validation in
read_file()inlsdos.c - Added validation in
sfs_ptr(),sfs_free_sec(), andsfs_used()inspartafs.c - Added loop detection to prevent infinite loops in sector chains
- Files affected:
src/lssfs.c,src/lsdos.c,src/spartafs.c
- Added validation in
-
Integer Overflow Protection (2026-01-21): Added overflow checks in size calculations to prevent buffer overflows and integer wraparound.
- Added checks in
image_size()andwrite_atr()inmkatr.c - Added checks in
load_atr_image()inatr.c - Files affected:
src/mkatr.c,src/atr.c
- Added checks in
Code Quality Improvements
-
Build System Organization (2026-01-21): Improved build system organization:
- All compiled binaries now placed in
bin/directory instead of root directory - Updated
make cleanto remove bothobj/andbin/directories - Better separation of build artifacts and final binaries
- Files affected:
Makefile
- All compiled binaries now placed in
-
Error Message Consistency (2026-01-21): Standardized all error messages to use "can't" instead of "can´t" throughout the codebase.
- Files affected:
src/atr.c,src/mkatr.c,src/lsdos.c,src/lssfs.c,src/lsextra.c,src/lshowfen.c
- Files affected:
-
Error Handling (2026-01-21): Improved error handling by:
- Checking
fwrite()return values inmkatr.c - Adding better error context to error messages
- Ensuring proper cleanup in error paths
- Checking
-
Memory Safety (2026-01-21): Improved memory management by:
- Ensuring proper cleanup in all error paths
- Validating memory allocation results
- Preventing memory leaks in error conditions
Documentation
-
README Updates (2026-01-21): Enhanced README.md with:
- Security considerations section
- Build requirements
- Known limitations
- Installation instructions
-
Security Documentation (2026-01-21): Created
SECURITY.mdwith:- Security features overview
- Security recommendations for users and developers
- Security issue reporting guidelines
-
Changelog (2026-01-21): Created
CHANGELOG.mdto track all changes, improvements, and security fixes.
[1.4~beta] - Previous Release
Features
-
Support for creating ATR images with SpartaDOS/BW-DOS filesystem
-
Support for listing and extracting from multiple DOS formats:
- Atari DOS 1, 2.0, 2.5
- MyDOS
- SpartaDOS and BW-DOS
- LiteDOS 2.x and LiteDOS-SE
- BAS2BOOT images
- Howfen DOS images
- K-file boot images
-
Boot file support with configurable bootloader address
-
File attribute support (protected, hidden, archived)
-
Directory structure support
-
Multiple disk size formats (90k to 16MB)
Known Issues (Fixed in Unreleased)
- Path traversal vulnerability in file extraction
- Unchecked memory allocation return values
- Unsafe string operations
- Missing sector number validation
- Integer overflow vulnerabilities
- Inconsistent error message formatting
Version History
- 1.4~beta: Initial public release with core functionality
- Unreleased: Security fixes and code quality improvements