mirror of https://github.com/pkg/sftp.git
				
				
				
			remove unstandard error
All unmarshall calls return the same errShortPacket except this one for no reason. Fix that.
This commit is contained in:
		
							parent
							
								
									79ae07e778
								
							
						
					
					
						commit
						d4a0cecfdc
					
				|  | @ -802,7 +802,7 @@ func (p *sshFxpDataPacket) UnmarshalBinary(b []byte) error { | |||
| 	} else if p.Length, b, err = unmarshalUint32Safe(b); err != nil { | ||||
| 		return err | ||||
| 	} else if uint32(len(b)) < p.Length { | ||||
| 		return errors.New("truncated packet") | ||||
| 		return errShortPacket | ||||
| 	} | ||||
| 
 | ||||
| 	p.Data = make([]byte, p.Length) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue