Modified the validation for ascii tag type

This commit is contained in:
Emmanuel Antony committed 2021-03-20 08:47:47 +05:30
1 parent 53d0256585
commit f5754159cb
2 files changed
+15 -3

No files matched your search

+7
View File
@@ -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)