Modified the validation for ascii tag type
This commit is contained in:
1 parent
53d0256585
commit
f5754159cb
2 files changed
+15
-3
No files matched your search
@@ -1,6 +1,7 @@
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
use std::str;
|
||||
use std::string;
|
||||
|
||||
use crate::decoder::ifd::Value;
|
||||
@@ -246,6 +247,12 @@ impl From<io::Error> for TiffError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<str::Utf8Error> for TiffError {
|
||||
fn from(_err: str::Utf8Error) -> TiffError {
|
||||
TiffError::FormatError(TiffFormatError::InvalidTag)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<string::FromUtf8Error> for TiffError {
|
||||
fn from(_err: string::FromUtf8Error) -> TiffError {
|
||||
TiffError::FormatError(TiffFormatError::InvalidTag)
|
||||
|
||||
Reference in new issue
Block a user