comparison OrthancServer/FromDcmtkBridge.cpp @ 1854:e2c3d752ee1a

prevent too long tags to be inserted
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 01 Dec 2015 15:43:23 +0100
parents 3ae2ff249675
children c7d70f659190
comparison
equal deleted inserted replaced
1853:b7d3d3b182cf 1854:e2c3d752ee1a
374 } 374 }
375 else 375 else
376 { 376 {
377 std::string s(c); 377 std::string s(c);
378 std::string utf8 = Toolbox::ConvertToUtf8(s, encoding); 378 std::string utf8 = Toolbox::ConvertToUtf8(s, encoding);
379 return new DicomValue(utf8, false); 379
380 if (utf8.size() > ORTHANC_MAXIMUM_TAG_LENGTH)
381 {
382 return new DicomValue; // Create a NULL value
383 }
384 else
385 {
386 return new DicomValue(utf8, false);
387 }
380 } 388 }
381 } 389 }
382 390
383 try 391 try
384 { 392 {