From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: [PATCH] IntelFsp2Pkg/Library/BaseFspCommonLib: Fix OVERRUN Coverity issue To: devel@edk2.groups.io From: "Ranbir Singh" X-Originating-Location: Bengaluru, Karnataka, IN (122.172.85.38) X-Originating-Platform: Windows Chrome 108 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 03 Jan 2023 20:34:36 -0800 Message-ID: X-Groupsio-MsgNum: 97907 Content-Type: multipart/mixed; boundary="aIJy40u2jttDjZvawcPM" --aIJy40u2jttDjZvawcPM Content-Type: multipart/alternative; boundary="0PwyTVtPJMaIpvfFYl3j" --0PwyTVtPJMaIpvfFYl3j Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Attached patch fixes the *OVERRUN* Coverity issue in the file *IntelFsp2Pkg= /Library/BaseFspCommonLib/FspCommonLib.c* Please consider it for review and merge. --0PwyTVtPJMaIpvfFYl3j Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Attached patch fixes the OVERRUN Coverity issue in the fil= e IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c

Please consider it for review and merge. --0PwyTVtPJMaIpvfFYl3j-- --aIJy40u2jttDjZvawcPM Content-Type: text/plain; name="0001-IntelFsp2Pkg-Library-BaseFspCommonLib-Fix-OVERRUN-Co.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-IntelFsp2Pkg-Library-BaseFspCommonLib-Fix-OVERRUN-Co.patch" RnJvbSBlMGRmNWIwYTM0ZjFiOTZhYTk2MTBjNWVlZjkxNjFjYmJjYTcxN2QyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSYW5iaXIgU2luZ2ggPFJhbmJpci5TaW5naDNARGVsbC5jb20+ CkRhdGU6IFRodSwgMjIgRGVjIDIwMjIgMTA6NTc6MjEgKzA1MzAKU3ViamVjdDogW1BBVENIXSBJ bnRlbEZzcDJQa2cvTGlicmFyeS9CY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