pajowu/signal-backup-decode

thread '<unnamed>' panicked at 'assertion failed: output.len() <= c_int::max_value() as usize

Opened this issue · 1 comments

I've used your tool for over a year to extract my signal backups, and it always worked perfectly, it even managed to extract incomplete copies of *.backup files that I ended up with from time to time.

But now I ran into a problem:

13:52:56 �[0m�[34m[INFO] �[0mOutput path: signal-2023-07-26-04-46-08
13:52:56 �[0m�[34m[INFO] �[0mInput file: Archives/signal-2023-07-26-04-46-08.backup
thread '' panicked at 'assertion failed: output.len() <= c_int::max_value() as usize', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.38/src/symm.rs:627:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

I've tried to do a fresh install using cargo install --git https://github.com/pajowu/signal-backup-decode signal-backup-decode since I thought maybe there was something broken with the openssl (since that was what caused the panic), but today's stable rust compiler version doesn't want to compile the version in this git repository:

error: custom inner attributes are unstable
 --> src/Backups.rs:9:4
  |
9 | #![rustfmt::skip]
  |    ^^^^^^^^^^^^^
  |
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
  = note: `#[deny(soft_unstable)]` on by default

warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
  --> src/message.rs:31:28
   |
31 |                 chrono::NaiveDateTime::from_timestamp(x / 1000, 0)
   |                                        ^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
  --> src/message.rs:33:28
   |
33 |                 chrono::NaiveDateTime::from_timestamp(0, 0)
   |                                        ^^^^^^^^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
  --> src/message.rs:37:28
   |
37 |                 chrono::NaiveDateTime::from_timestamp(x / 1000, 0)
   |                                        ^^^^^^^^^^^^^^

warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
  --> src/message.rs:39:28
   |
39 |                 chrono::NaiveDateTime::from_timestamp(0, 0)
   |                                        ^^^^^^^^^^^^^^

warning: unused variable: `key_value`
   --> src/output_csv.rs:101:32
    |
101 |     fn write_key_value(&mut self, key_value: &crate::Backups::KeyValue) ->  Result<(), anyhow::Error>{
    |                                   ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_value`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `key_value`
  --> src/output_none.rs:72:32
   |
72 |     fn write_key_value(&mut self, key_value: &crate::Backups::KeyValue) ->  Result<(), anyhow::Error>{
   |                                   ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_value`

warning: unused variable: `key_value`
   --> src/output_raw.rs:247:32
    |
247 |     fn write_key_value(&mut self, key_value: &crate::Backups::KeyValue) ->  Result<(), anyhow::Error>{
    |                                   ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_key_value`

warning: `signal-backup-decode` (bin "signal-backup-decode") generated 7 warnings
error: could not compile `signal-backup-decode` due to previous error; 7 warnings emitted
error: failed to compile `signal-backup-decode v0.2.3 (https://github.com/pajowu/signal-backup-decode#31100a37)`, intermediate artifacts can be found at `/tmp/cargo-installwYaMz2`

Next I've had a look at https://github.com/pajowu/signal-backup-decode/network and found a fork with a branch that had a promising name: support-new-backup-version.

I managed to install that version using cargo install --git "https://github.com/pascalgn/signal-backup-decode" --branch support-new-backup-version which also gave a few warnings, but no errors.

Using that I was able to unpack my newer signal backups just fine again. Would be lovely if you could merge that change and publish a new version with it.

Yea, but the maintainers are not here to make the merge, and the pascalg support-new-backup-version branch is failing to build because he didnt update the project's rust packages, so until he updates it and then @pajowu merges that into main this will keep failing.