Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pdaxrom/microcpu
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: pdaxrom/microcpu
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: code_review
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 26, 2025

  1. fix code style

    pdaxrom committed Oct 26, 2025
    Configuration menu
    Copy the full SHA
    81ae85a View commit details
    Browse the repository at this point in the history
  2. fix(asm): fix buffer overflows in operand and get_bytes functions

    - Replace variable-length arrays with fixed-size buffers (256 bytes)
    - Add bounds checks in operand() to prevent buffer overflow
    - Fix loop condition in get_bytes() to avoid infinite loops
    - Use safe string copy with strncpy and null termination
    - Add output buffer size checks before writing
    - Correct typo in CONSTANT_VALUE_TOO_BIG error
    pdaxrom committed Oct 26, 2025
    Configuration menu
    Copy the full SHA
    b1364fc View commit details
    Browse the repository at this point in the history
  3. fix(asm): add checks for memory allocation failures

    - Check return values of malloc, realloc, and strdup in add_label, add_proc, and add_macro
    - Free allocated memory on strdup failure to prevent leaks
    - Set appropriate error codes on allocation failures
    pdaxrom committed Oct 26, 2025
    Configuration menu
    Copy the full SHA
    7e3bf27 View commit details
    Browse the repository at this point in the history
  4. fix(asm): fix expression parsing issues

    - Add division by zero checks in exp6() for / and % operators
    - Replace variable-length arrays with fixed-size buffers in operand, find_opcode_in_string, and find_register_in_string
    - Add bounds checks to prevent buffer overflows in string parsing functions
    - In operand(), error on unresolved labels in pass 2 instead of silently returning 0
    pdaxrom committed Oct 26, 2025
    Configuration menu
    Copy the full SHA
    82f5742 View commit details
    Browse the repository at this point in the history
  5. fix(asm): fix file handling issues

    - Add check for argc >= 2 in main() to prevent invalid argv[1] access
    - Change fseek check to error and exit if rewinding file fails for pass 2
    - Remove invalid 'else' clause in main() that was causing compilation errors
    pdaxrom committed Oct 26, 2025
    Configuration menu
    Copy the full SHA
    59e16ce View commit details
    Browse the repository at this point in the history
  6. fix(asm): resolve potential bugs in assembler

    - Correct SKIP_TOKEN macro logic error
    - Fix memory leaks in add_macro function
    - Make label and proc lookups case-insensitive
    pdaxrom committed Oct 26, 2025
    Configuration menu
    Copy the full SHA
    6862514 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5fb0851 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fc4aa45 View commit details
    Browse the repository at this point in the history
Loading