skim: 0.15.7 -> 0.16.0 (#376410)
[NixPkgs.git] / pkgs / by-name / sr / srt-live-server / fix-insecure-printfs.patch
blob8cc85549d13edfcca6518fe3c45d13fee0a971a6
1 diff --color -ur a/Makefile b/Makefile
2 --- a/Makefile 2021-04-16 13:02:41.416453040 +0200
3 +++ b/Makefile 2021-04-16 13:21:23.020089623 +0200
4 @@ -1,3 +1,4 @@
5 +PREFIX = /usr/local
6 SHELL = /bin/sh
7 MAIN_NAME=sls
8 CLIENT_NAME=slc
9 @@ -64,3 +65,16 @@
10 rm -f $(OUTPUT_PATH)/*.o
11 rm -rf $(BIN_PATH)/*
13 +install: all
14 + @echo installing executable files to ${DESTDIR}${PREFIX}/bin
15 + @mkdir -p "${DESTDIR}${PREFIX}/bin"
16 + @cp -f ${BIN_PATH}/${MAIN_NAME} "${DESTDIR}${PREFIX}/bin"
17 + @chmod 755 "${DESTDIR}${PREFIX}/bin/${MAIN_NAME}"
18 + @cp -f ${BIN_PATH}/${CLIENT_NAME} "${DESTDIR}${PREFIX}/bin"
19 + @chmod 755 "${DESTDIR}${PREFIX}/bin/${CLIENT_NAME}"
21 +uninstall:
22 + @echo removing executable files from ${DESTDIR}${PREFIX}/bin
23 + @rm -f "${DESTDIR}${PREFIX}/bin/${MAIN_NAME}"
24 + @rm -f "${DESTDIR}${PREFIX}/bin/${CLIENT_NAME}"
26 diff --color -ur a/slscore/HttpClient.cpp b/slscore/HttpClient.cpp
27 --- a/slscore/HttpClient.cpp 2021-04-16 13:02:41.416453040 +0200
28 +++ b/slscore/HttpClient.cpp 2021-04-16 13:11:40.343866698 +0200
29 @@ -90,7 +90,7 @@
30 goto FUNC_END;
32 if (NULL != method && strlen(method) > 0) {
33 - sprintf(m_http_method, method);
34 + strcpy(m_http_method, method);
37 m_interval = interval;
38 diff --color -ur a/slscore/SLSLog.cpp b/slscore/SLSLog.cpp
39 --- a/slscore/SLSLog.cpp 2021-04-16 13:02:41.416453040 +0200
40 +++ b/slscore/SLSLog.cpp 2021-04-16 13:08:16.836119519 +0200
41 @@ -85,7 +85,7 @@
42 vsnprintf (buf , 4095 , fmt , vl);
43 //sprintf(buf_info, "%s %s: %s\n" , cur_time, LOG_LEVEL_NAME[level], buf);
44 sprintf(buf_info, "%s:%03d %s %s: %s\n" , cur_time, cur_time_msec, APP_NAME, LOG_LEVEL_NAME[level], buf);
45 - printf(buf_info);
46 + puts(buf_info);
48 if (m_log_file) {
49 fwrite(buf_info, strlen(buf_info), 1, m_log_file);
50 diff --color -ur a/slscore/SLSSrt.cpp b/slscore/SLSSrt.cpp
51 --- a/slscore/SLSSrt.cpp 2021-04-16 13:02:41.417452995 +0200
52 +++ b/slscore/SLSSrt.cpp 2021-04-16 13:10:11.004957820 +0200
53 @@ -124,7 +124,7 @@
54 std::map<int, std::string>::iterator it;
55 for(it=map_error.begin(); it!=map_error.end(); ++it) {
56 sprintf(szBuf, "%d: %s\n", it->first, it->second.c_str());
57 - printf(szBuf);
58 + puts(szBuf);
60 printf("----------end------------\n");
61 map_error.clear();