Skip to content

Commit 36e98ae

Browse files
committed
Fix a bug I thought i fixed before
1 parent 8a83cc9 commit 36e98ae

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Description: Intense parallel workloads can be difficult to monitor.
1414
visualize the log file to reveal potential resource-related
1515
reasons for the crash. The 'autometric' package borrows heavily from
1616
the methods of packages 'ps' <doi:10.32614/CRAN.package.ps> and 'psutil'.
17-
Version: 0.1.1.9001
17+
Version: 0.1.2
1818
License: MIT + file LICENSE
1919
URL:
2020
https://wlandau.github.io/autometric/,

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# autometric 0.1.1.9001
1+
# autometric 0.1.2
22

33
* Plot the last PID by default.
44
* Speed up `log_phase_set()`.
5+
* Do not overwrite null character in `strncpy()`.
56

67
# autometric 0.1.1
78

inst/WORDLIST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ codecov
1717
pkgdown
1818
CloudWatch
1919
SLURM
20+
PID

src/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void pthread_phase_reset(void) {
8787

8888
void pthread_phase_set(const char* phase) {
8989
pthread_mutex_lock(&run_mutex);
90-
strncpy(run_phase, phase, PHASE_N);
90+
strncpy(run_phase, phase, PHASE_N - 1);
9191
run_phase[PHASE_N - 1] = '\0';
9292
pthread_mutex_unlock(&run_mutex);
9393
}

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define VERSION "0.1.1.9001"
1+
#define VERSION "0.1.2"

0 commit comments

Comments
 (0)