Iterate over the stats array instead of the strings
arrays in aer_stats_dev_attr API. This is to avoid the
array out of bounds access cases for the stats array.
This change is similar to the change in upstream
commit <5e6ae050955b566484f3cc6a66e3925eae87a0ed>
("PCI/AER: Iterate over error counters instead
of error strings").
Since strings array is of size 32 and the stats arrays
are of the sizes AER_MAX_TYPEOF_COR_ERRS = 16 and
AER_MAX_TYPEOF_UNCOR_ERRS = 27, there can be a case where
stats array will be accessed out of bounds as we are iterating
over the strings array.
So with this change, we will be iterrating over the stats array
instead of the strings array.
Change-Id: I6f78605a25962a8efebdbfada8d9cacff2dab947
Signed-off-by: Prudhvi Yarlagadda <quic_pyarlaga@quicinc.com>