Comments (2)
The code you reference is only executed inside the H.263 and H.264 plugin which are shared libraries themselves and don't have and provision for any config settings.
I fixed the one strcpy() and added a security note that if one uses these plugins the environment needs to be secured which probably isn't very difficult in most server installations.
If you see a way to use the plugins without any trusted environment variables, please provide a patch.
from h323plus.
Oh yes. It's a shared library for developers, and have no any other config settings.
In that way, I think that using current module path may be another optional way to locate the plugin path.
I think the developers could put the plugins and other shared libraries into the same directory with their executable file, which can be wrote to the tutorial document. In this way, GetModuleName could be used to get current executable module path in Windows platform. And in linux, readlink( "/proc/self/exe", path, PATH_MAX) can get current executable module path.
// Windows
TCHAR szPath[MAX_PATH];
GetModuleFileName(NULL, szPath, MAX_PATH));
// Linux
char path[MAX_PATH];
readlink("/proc/self/exe", path, MAX_PATH);
Hardcoded path could be always a second option way as you use in your code:
// Windows
InternalOpen("C:\\H323plus\plugin", name); // just an example path for windows
// Linux
InternalOpen("/usr/local/lib", name);
Anyway, what I mentioned above is just my advice for that. Environment variable is still widily used, and it's ok if only developers make sure that the environment variable is unable to be modified by others.
However the buffer overflow issue is nessussary to be fixed by using strcpy_s\strcat_s instead.
from h323plus.
Related Issues (20)
- Helpwanted: How can I share my desktop with simpleh323! HOT 1
- simph323 no speex support when compiled HOT 1
- Setting PWLIBPLUGINDIR and no sound card is found anymore HOT 3
- PTLib can't be found during cross compile, but ptlib-config is found. HOT 6
- How to add h.264 video capability in TCS? HOT 1
- callgen and simph323 H225 assert in CallCeanup HOT 2
- DynaLink::Open strncpy ptlibPath may not be null-terminated HOT 1
- plugins compilation error HOT 1
- segmentation fault with h263-1998_video_pwplugin.so HOT 1
- Build h323plus/plugins fail HOT 1
- Trace Class has not GetDLLPath() HOT 1
- "roundTripDelayRequest" was not sent HOT 2
- Calling 'H323ExtendedVideoCapability::AddAllCapabilities' twice will cause a crash HOT 1
- There is a bug in the 'Q931::SetBearerCapabilities' function HOT 1
- A crash occurs when the call is immediately hung up HOT 1
- why size is octetIndex In the Encode function for Q922_Frame HOT 3
- RTP Jitter thread consumes 100% CPU HOT 1
- Add support H.235 for H.239 HOT 26
- Can I use it in H. 248? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h323plus.