-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subroutine R63W72() intentionally overwrites array memory #216
Labels
bug
Something isn't working
Comments
I have no idea why this was done.
I am tempted to make the overwrite fatal
On Tuesday, October 3, 2023, Edward Hartnett ***@***.***> wrote:
In R63W72() we have this chilling comment:
C> @note kgds and igds extend beyond their dimensions here
C> if pl parameters are present.
When this function is called from some NCEPLIBS-g2 function during
testing, this condition can be found. See NOAA-EMC/NCEPLIBS-g2#385.
In the subroutine we have:
SUBROUTINE R63W72(KPDS,KGDS,IPDS,IGDS)
DIMENSION KPDS(200),KGDS(200),IPDS(200),IGDS(200)
and later:
C EXTENSION FOR PL PARAMETERS
IF(KGDS(1).EQ.0.AND.KGDS(19).EQ.0.AND.KGDS(20).NE.255) THEN
DO J=1,KGDS(3)
IGDS(18+J)=KGDS(21+J)
ENDDO
ENDIF
If KGDS(3) > 179, this will overwrite the boundary of the KGDS array.
I'm not sure what to do about this. @GeorgeGayno-NOAA or
@GeorgeVandenberghe-NOAA do you know why this would be done?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.<
…--
George W Vandenberghe
*Lynker Technologies at * NOAA/NWS/NCEP/EMC
5830 University Research Ct., Rm. 2141
College Park, MD 20740
***@***.***
301-683-3769(work) 3017751547(cell)
|
We can't tolerate out of bounds memory overwrites deep in our dependencies.
On Tuesday, October 3, 2023, George Vandenberghe - NOAA Affiliate <
***@***.***> wrote:
I have no idea why this was done.
I am tempted to make the overwrite fatal
On Tuesday, October 3, 2023, Edward Hartnett ***@***.***>
wrote:
> In R63W72() we have this chilling comment:
>
> C> @note kgds and igds extend beyond their dimensions here
> C> if pl parameters are present.
>
> When this function is called from some NCEPLIBS-g2 function during
testing, this condition can be found. See NOAA-EMC/NCEPLIBS-g2#385.
>
> In the subroutine we have:
>
> SUBROUTINE R63W72(KPDS,KGDS,IPDS,IGDS)
> DIMENSION KPDS(200),KGDS(200),IPDS(200),IGDS(200)
>
> and later:
>
> C EXTENSION FOR PL PARAMETERS
> IF(KGDS(1).EQ.0.AND.KGDS(19).EQ.0.AND.KGDS(20).NE.255) THEN
> DO J=1,KGDS(3)
> IGDS(18+J)=KGDS(21+J)
> ENDDO
> ENDIF
>
> If KGDS(3) > 179, this will overwrite the boundary of the KGDS array.
>
> I'm not sure what to do about this. @GeorgeGayno-NOAA or
@GeorgeVandenberghe-NOAA do you know why this would be done?
>
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you were mentioned.<
…
--
George W Vandenberghe
Lynker Technologies at NOAA/NWS/NCEP/EMC
5830 University Research Ct., Rm. 2141
College Park, MD 20740
***@***.***
301-683-3769(work) 3017751547(cell)
--
George W Vandenberghe
*Lynker Technologies at * NOAA/NWS/NCEP/EMC
5830 University Research Ct., Rm. 2141
College Park, MD 20740
***@***.***
301-683-3769(work) 3017751547(cell)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In R63W72() we have this chilling comment:
When this function is called from some NCEPLIBS-g2 function during testing, this condition can be found. See NOAA-EMC/NCEPLIBS-g2#385.
In the subroutine we have:
and later:
If KGDS(3) > 179, this will overwrite the boundary of the KGDS array.
I'm not sure what to do about this. @GeorgeGayno-NOAA or @GeorgeVandenberghe-NOAA do you know why this would be done?
The text was updated successfully, but these errors were encountered: