Check against the size of a std::vector to prevent out-of-boundary access.
Check against the size of a std::vector to prevent out-of-boundary access.

PiperOrigin-RevId: 343043192
Change-Id: Icc6f7338791709c1d9dfe20e985fbcdd50ed3336

yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,cxxgtxy/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,annarev/tensorflow,tensorflow/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,petewarden/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,annarev/tensorflow,paolodedios/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,sarvex/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,paolodedios/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,yongtang/tensorflow,annarev/tensorflow,annarev/tensorflow,yongtang/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,petewarden/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,annarev/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,sarvex/tensorflow