View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006146 | Taler | exchange | public | 2020-04-02 11:27 | 2021-09-02 18:14 |
Reporter | fefe | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 0.7.0 | ||||
Target Version | 0.7.1 | Fixed in Version | 0.7.1 | ||
Summary | 0006146: Taler exchange is multithreaded yet uses GNUNET_STRINGS_absolute_time_to_string | ||||
Description | GNUNET_STRINGS_absolute_time_to_string is not thread-safe. It returns a pointer to a static buffer, which is the same for all callers. So if two threads call it simultaneously, the two callers will clobber each other's output into the buffer and return a garbled value. Recommendation: add a GNUNET_STRINGS_absolute_time_to_string_r function that additionally takes a buffer and a buffer size as arguments. | ||||
Steps To Reproduce | gnunet-0.12.2/src/util/strings.c 741 const char * 742 GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t) 743 { 744 static char buf[255]; 759 return buf; 760 } | ||||
Tags | No tags attached. | ||||
|
Fixed in a4653a7a0..225ddf0a2 (gnunet.git) and d1bf2692..340ac361 (exchange.git) by adding missing GNUNET_THREAD_LOCAL for routines with such static buffers. |
|
Fix committed to master branch. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-04-02 11:27 | fefe | New Issue | |
2020-04-02 11:27 | fefe | Status | new => assigned |
2020-04-02 11:27 | fefe | Assigned To | => Christian Grothoff |
2020-04-02 11:40 | Christian Grothoff | Note Added: 0015489 | |
2020-04-02 11:40 | Christian Grothoff | Status | assigned => resolved |
2020-04-02 11:40 | Christian Grothoff | Resolution | open => fixed |
2020-04-02 11:40 | Christian Grothoff | Fixed in Version | => 0.7.1 |
2020-04-02 11:40 | Christian Grothoff | Target Version | => 0.7.1 |
2021-08-24 16:23 | Christian Grothoff | Status | resolved => closed |
2021-09-02 18:13 | Christian Grothoff | Changeset attached | => Taler-exchange master 340ac361 |
2021-09-02 18:14 | Christian Grothoff | Note Added: 0018269 |