Skip to content

Releases: Atari-Foundry/atrforge

Release v1.0.74

Choose a tag to compare

@rickcollette rickcollette released this 22 Jan 23:58

Release v1.0.74 - 2026-01-22 23:58:20

No new changes detected since last release.

Release v1.0.71

Choose a tag to compare

@rickcollette rickcollette released this 22 Jan 22:45

Release v1.0.71 - 2026-01-22 22:43:15

No new changes detected since last release.

Release v1.0.70

Choose a tag to compare

@rickcollette rickcollette released this 22 Jan 22:29

Release v1.0.70 - 2026-01-22 22:29:03

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-utf8 and --convert-atascii options to convert files during
      ATR resize/sector conversion operations
    • atrcp: Added --to-utf8, --to-atascii, and --7bit options:
      • --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-atascii option 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
  • ATR File Copy Tool (2026-01-21): New atrcp program 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
  • ATR File Modification (2026-01-21): Added ability to add files to existing ATR images
    using the -a option in atrforge. 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
  • ATR Conversion Tool (2026-01-21): New convertatr program 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 in compat.c
    • Applied path sanitization in lssfs.c, lsdos.c, and lsextra.c
    • Files affected: src/compat.c, src/compat.h, src/lssfs.c, src/lsdos.c, src/lsextra.c
  • 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
  • Unsafe String Operations (2026-01-21): Replaced unsafe strcpy() and strcat() calls
    with bounds-checked alternatives (strncpy(), snprintf()).

    • Files affected: src/lsextra.c, src/flist.c
  • 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() and read_file() in lssfs.c
    • Added validation in read_file() in lsdos.c
    • Added validation in sfs_ptr(), sfs_free_sec(), and sfs_used() in spartafs.c
    • Added loop detection to prevent infinite loops in sector chains
    • Files affected: src/lssfs.c, src/lsdos.c, src/spartafs.c
  • Integer Overflow Protection (2026-01-21): Added overflow checks in size calculations to
    prevent buffer overflows and integer wraparound.

    • Added checks in image_size() and write_atr() in mkatr.c
    • Added checks in load_atr_image() in atr.c
    • Files affected: src/mkatr.c, src/atr.c

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 clean to remove both obj/ and bin/ directories
    • Better separation of build artifacts and final binaries
    • Files affected: Makefile
  • 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
  • Error Handling (2026-01-21): Improved error handling by:

    • Checking fwrite() return values in mkatr.c
    • Adding better error context to error messages
    • Ensuring proper cleanup in error paths
  • 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.md with:

    • Security features overview
    • Security recommendations for users and developers
    • Security issue reporting guidelines
  • Changelog (2026-01-21): Created CHANGELOG.md to track all changes, improvements, and
    security fixes.