Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#9837 closed Patch - Bug Fix (fixed)

[PATCH] Perl binding - stream_backend_file broken

Reported by: dbadia@… Owned by: beirdo
Priority: minor Milestone:
Component: Bindings - Perl Version: 0.24-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Perl stream_backend_file seems to be broken in 24-fixes and head in the following ways:

  1. When sending the FileTransfer? command, it doesn't include all requied parameters, causing the backend to responsd with "malformed_filetransfer_command"
  2. The file being requested must start with a / (this is more an ease of use change as opposed to a bug)
  3. The length of the file to be streamed is not parsed correctly when > 2147483647, which results in corrupt or zero length files being written to disk

This patch fixes these issues. Patch applies cleanly to 24-fixes and head

The file length fix was tested against files of lengths:

  1. 2012338647 (regression)
  2. 2500703244 (requires conversion to unsigned to be interpreted correctly)
  3. 31219659384 (test longlong)

Thanks
Dave

Attachments (2)

perl-stream.diff (2.6 KB) - added by David Badia <dbadia@…> 3 years ago.
perl-stream2.diff (3.1 KB) - added by David Badia <dbadia@…> 3 years ago.
replaces previous file

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by David Badia <dbadia@…>

comment:1 Changed 3 years ago by David Badia <dbadia@…>

Oops looks like

  1. The file being requested must start with a / (this is more an ease of use change as opposed to a bug)

isn't in this patch after all. I'll submit a separate ticket for that.

Dave

Changed 3 years ago by David Badia <dbadia@…>

replaces previous file

comment:2 Changed 3 years ago by beirdo

Hmmm. After 1508085eb3cf5f5b88afdfb92465507a0e669a81 went into master, the 64bit part is no longer necessary. Please retest without that with current master. The first part will be committed now.

comment:3 Changed 3 years ago by beirdo

Oh, however, the patch as is seems to be applicable for 0.24-fixes.

comment:4 Changed 3 years ago by Github

  • Milestone changed from unknown to 0.25
  • Resolution set to fixed
  • Status changed from new to closed

Fix stream_backend_file in the perl bindings

stream_backend_file seems to be broken in 24-fixes and master in the following
ways:

  1. When sending the FileTransfer? command, it doesn't include all required

parameters causing the backend to respond with "malformed_filetransfer_command"

  1. The length of the file to be streamed is not parsed correctly when >

2147483647, which results in corrupt or zero length files being written to
disk

This patch fixes these issues. Patch applies cleanly to 24-fixes and master

The file length fix was tested against files of lengths 2012338647
(regression), 2500703244 (requires conversion to unsigned to be interpreted
correctly), and 31219659384 (test longlong)

Fixes #9837

Signed-off-by: Gavin Hurlbut <ghurlbut@…>

Branch: master
Changeset: 18a00f6c10b1a0a5fbaf8abebadeb0453e68b0ef

comment:5 Changed 3 years ago by Github

Reverse the bigint part of the perl bindings patch

This part is not needed since 1508085eb3cf5f5b88afdfb92465507a0e669a81 was
committed, however the actual field should be #2, not #3.

Refs #9837

Branch: master
Changeset: 7aeb4eafda20f64702170a23fd7acf43ae4e31dc

comment:6 Changed 3 years ago by beirdo

  • Milestone changed from 0.25 to 0.24.2

comment:7 Changed 2 years ago by stuartm

  • Milestone 0.24.2 deleted

Milestone 0.24.2 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.