Skip to content

Commit

Permalink
Merge pull request #56 from Decompollaborate/develop
Browse files Browse the repository at this point in the history
1.9.2
  • Loading branch information
AngheloAlf authored Mar 10, 2024
2 parents 1303f2f + d717d29 commit 078574d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.9.2] - 2024-03-10

### Fixed

- Fix possible stack overflow if `immOverride` is larger than 255 bytes.

## [1.9.1] - 2024-02-18

### Fixed
Expand Down Expand Up @@ -548,6 +554,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- First version

[unreleased]: https://github.com/Decompollaborate/rabbitizer/compare/master...develop
[1.9.2]: https://github.com/Decompollaborate/rabbitizer/compare/1.9.1...1.9.2
[1.9.1]: https://github.com/Decompollaborate/rabbitizer/compare/1.9.0...1.9.1
[1.9.0]: https://github.com/Decompollaborate/rabbitizer/compare/1.8.3...1.9.0
[1.8.3]: https://github.com/Decompollaborate/rabbitizer/compare/1.8.2...1.8.3
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[package]
name = "rabbitizer"
# Version should be synced with include/common/RabbitizerVersion.h
version = "1.9.1"
version = "1.9.2"
edition = "2021"
authors = ["Anghelo Carvajal <[email protected]>"]
description = "MIPS instruction decoder"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In order to keep it simple and fast the following features will not be added:
The recommended way to install is using from the PyPi release, via `pip`:

```bash
pip install rabbitizer
pip install -U rabbitizer
```

In case you want to mess with the latest development version without wanting to
Expand All @@ -82,7 +82,7 @@ cargo add rabbitizer
Or you can add it manually to your `Cargo.toml`:

```toml
rabbitizer = "1.9.1"
rabbitizer = "1.9.2"
```

See this crate at <https://crates.io/crates/rabbitizer>.
Expand Down
2 changes: 1 addition & 1 deletion include/common/RabbitizerVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extern "C" {
// Header version
#define RAB_VERSION_MAJOR 1
#define RAB_VERSION_MINOR 9
#define RAB_VERSION_PATCH 1
#define RAB_VERSION_PATCH 2

#define RAB_VERSION_STR RAB_STRINGIFY(RAB_VERSION_MAJOR) "." RAB_STRINGIFY(RAB_VERSION_MINOR) "." RAB_STRINGIFY(RAB_VERSION_PATCH)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[project]
name = "rabbitizer"
# Version should be synced with include/common/RabbitizerVersion.h
version = "1.9.1"
version = "1.9.2"
description = "MIPS instruction decoder"
# license = "MIT"
readme = "README.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,29 @@
#include "instructions/RabbitizerInstruction.h"

#include <assert.h>
#include <stdlib.h>

#include "generated/instrOpercandCallbacks_array.h"

size_t RabbitizerOperandType_getBufferSize(RabbitizerOperandType operand, const RabbitizerInstruction *instr,
size_t immOverrideLength) {
char auxBuffer[0x100] = { 0 };
char immOverride[0x100] = { 0 };
char *auxBuffer = calloc(immOverrideLength * 2 + 2, sizeof(char));
char *immOverride = calloc(immOverrideLength + 2, sizeof(char));
OperandCallback callback;
size_t size;

assert(operand > RAB_OPERAND_ALL_INVALID);
assert(operand < RAB_OPERAND_ALL_MAX);

callback = instrOpercandCallbacks[operand];
assert(callback != NULL);

return callback(instr, auxBuffer, immOverride, immOverrideLength);
size = callback(instr, auxBuffer, immOverride, immOverrideLength);

free(auxBuffer);
free(immOverride);

return size;
}

size_t RabbitizerInstruction_getSizeForBufferOperandsDisasm(const RabbitizerInstruction *self,
Expand Down

0 comments on commit 078574d

Please sign in to comment.