'Returns a list of words at the address ad. size_word must be in
[1, 2, 4, 8] otherwise the function returns None. The returned
list could be less than nb_entries if it\'s at the end of a
section.
The parameter section is the section where ad is. It\'s just use for
optimization and used to not recall get_section.'

def read_array(self, ad, nb_entries, size_word, section=None):

    if ((size_word != 1) and (size_word != 2) and (size_word != 4) and (size_word != 8)):
        return None
    if (section is None):
        section = self.__binary.get_section(ad)
    array = []
    l = 0
    while (l < nb_entries):
        val = section.read_int(ad, size_word)
        if (val is None):
            return array
        array.append(val)
        ad += size_word
        l += 1
    return array
