Hi Matt,
It's been a while and I haven't heard from Mario. I tried a different email 
address I found on this CV, but didn't get a reply, and I can't find any 
contact information for Karsten Ahnert. Do you have other ideas about how to 
contact them, or could someone else step in as a maintainer?

Best wishes,
Justin

________________________________________
From: McGrath, Justin M <jmcgr...@illinois.edu>
Sent: Thursday, November 16, 2023 9:43 AM
To: Matt Borland
Cc: Boost users list; mario.mulan...@gmx.net
Subject: Re: [Boost-users] Could sprintf be replaced with snprintf?

Thanks Matt.

________________________________________
From: Matt Borland <m...@mattborland.com>
Sent: Thursday, November 16, 2023 9:32 AM
To: McGrath, Justin M
Cc: Boost users list; mario.mulan...@gmx.net
Subject: Re: [Boost-users] Could sprintf be replaced with snprintf?



On Nov 16, 2023, at 4:22 PM, McGrath, Justin M <jmcgr...@illinois.edu> wrote:

Hi Matt,
In ODEINT it's called in max_step_checker.hpp.

```
const int m_max_steps;
...
char error_msg[200];
std::sprintf(error_msg, "Max number of iterations exceeded (%d).", m_max_steps);
...
char error_msg[200];
std::sprintf(error_msg, "Max number of iterations exceeded (%d).", m_max_steps);

```

It looks to me that neither of these uses could possibly overflow, but for 
whatever reason people have latched onto the idea that sprintf should never be 
used.

Cheers,
Justin




Justin,

It looks like someone filed a PR about a year ago to fix that: 
https://github.com/boostorg/odeint/pull/58<https://urldefense.com/v3/__https://github.com/boostorg/odeint/pull/58__;!!DZ3fjg!6druIjXAXDKen8dGi26CYtTBh_uBn-gpYisQa9FOdL-EZwBQObAMTh7azQhBLUIgRrZIIjto90zOMbIsnkU$>
 , but the last commit to ODEINT is spring of 2019. I cc’ed the maintainer so 
hopefully he sees this.

Matt

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply via email to