Skip to content
Snippets Groups Projects
Commit aa3913e3 authored by Qianqian Fang's avatar Qianqian Fang
Browse files

disable TFN marker in optimized header due to security risk and low benefit

parent 6345859f
No related branches found
No related tags found
No related merge requests found
...@@ -207,12 +207,8 @@ function [data, adv]=parse_block(inputstr, pos, type,count,varargin) ...@@ -207,12 +207,8 @@ function [data, adv]=parse_block(inputstr, pos, type,count,varargin)
case 'C' case 'C'
data=inputstr(pos:pos+count); data=inputstr(pos:pos+count);
adv=count; adv=count;
case 'T' case {'T','F','N'}
data=true(1,count); error_pos(sprintf('For security reasons, optimized type %c is disabled at position %%d', type),inputstr, pos);
case 'F'
data=false(1,count);
case 'N'
data=cell(1,count);
otherwise otherwise
error_pos(sprintf('Unsupported optimized type %c at position %%d', type),inputstr, pos); error_pos(sprintf('Unsupported optimized type %c at position %%d', type),inputstr, pos);
end end
...@@ -221,7 +217,6 @@ function [data, adv]=parse_block(inputstr, pos, type,count,varargin) ...@@ -221,7 +217,6 @@ function [data, adv]=parse_block(inputstr, pos, type,count,varargin)
[cid,len]=elem_info(inputstr, pos, type); [cid,len]=elem_info(inputstr, pos, type);
datastr=inputstr(pos:pos+len*count-1); datastr=inputstr(pos:pos+len*count-1);
newdata=uint8(datastr); newdata=uint8(datastr);
%id=strfind('iUIulmLMhdD',type);
if(varargin{1}.flipendian_) if(varargin{1}.flipendian_)
newdata=swapbytes(typecast(newdata,cid)); newdata=swapbytes(typecast(newdata,cid));
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment