This is a known issue in various versions of SQL.
Please read at this page from Microsoft: https://support.microsoft.com/en-us/help/973524/fix-the-execution-of-the-xp-readerrorlog-command-in-sql-server-2005-an, and then make sure you're properly patched according to Microsoft's advice.